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

[eluser]Keloo[/eluser]
I did something like this:
Code:
function user()
{
  if(!$this->ion_auth->logged_in())
  {
   redirect('home/index');
  }
  
  $id = $this->input->post('id');

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

   if($this->ion_auth->update($id,$update))
   {
    $this->session->set_flashdata('message', "Signup Successful");
    redirect('home/user/'.$this->session->userdata('username'));
   }
  
  }

  $this->db->where('username',$this->uri->segment(3));
  $this->data['users'] = $this->ion_auth->users()->result();
  
  $this->layouts->view('user',$this->data);
  
}

It works fine. Thx for the help guys, much appreciate it. Big Grin


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