Welcome Guest, Not a member yet? Register   Sign In
how update user data using ion_auth ?
#2

[eluser]El J![/eluser]
Try this:

Code:
function user()
{
  if(!$this->ion_auth->logged_in())
  {
   redirect('home/index');
  }

   $id = $this->input->post('user_id');

   // populate data in form
   $this->db->where('username',$this->uri->segment(3));
   $this->data['users'] = $this->ion_auth->users()->result();

  if($id != '') {

    $update = array(
    'first_name' => $this->input->post('first_name'),
    'last_name' => $this->input->post('last_name'),
    'email' => $this->input->post('email')
     );

   $this->ion_auth->update($id,$update);
  
  }

  // Show View
  $this->layouts->view('user',$this->data);

}

Perhaps you'll can print the values of array and $id variable, and check what they have in runtime...

Code:
print_r($update);
echo "<br />" . $id;
die();


Messages In This Thread
how update user data using ion_auth ? - by El Forum - 06-03-2012, 03:36 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 05:09 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 07:36 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 08:02 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 08:41 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 09:09 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 09:15 AM
how update user data using ion_auth ? - by El Forum - 06-03-2012, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB