Skip to content

Instantly share code, notes, and snippets.

@gregbarcza
Created March 7, 2013 13:22
Show Gist options
  • Save gregbarcza/5108026 to your computer and use it in GitHub Desktop.
Save gregbarcza/5108026 to your computer and use it in GitHub Desktop.
<?php
$this->load->helper(array('string','array'));
$pass = random_string();
$this->load->driver('Streams');
$profile_validation = $this->streams->streams->validation_array('profiles', 'users');
$assignments = $this->streams->streams->get_assignments('profiles', 'users');
//var_dump($profile_validation);
//var_dump($assignments);
//die();
$profile_data['first_name'] = $this->input->post('first_name');
$profile_data['last_name'] = $this->input->post('last_name');
$profile_data['display_name'] = $this->input->post('name');
$profile_data['uid'] = $this->input->post('id');
$gender=substr($this->input->post('gender'), 0,1);
if(!$gender)
{
$gender='f';
}
$profile_data['gender'] = $gender;
$profile_data['city'] = element('name',$this->input->post('location'));
$dob=strtotime($this->input->post('birthday'));
$profile_data['dob']=date('Y-m-d',$dob);
$id = $this->ion_auth_model->register($this->input->post('username'), $pass, $this->input->post('email'), null, $profile_data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment