Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2
#33

[eluser]joytopia[/eluser]
Phil and Ben,

ion_auth_model->update_user brings up an database error, if no field of the user table is in the $data-array.

Since I want to change username, password and email, I added an new if-condition:
Code:
if(array_key_exists('username', $data) OR array_key_exists('password', $data) OR array_key_exists('email', $data))
        
        {
            if(array_key_exists('password', $data))
            {
                $data['password'] = $this->hash_password($data['password']);
            }
    
            $this->db->where($this->ion_auth->_extra_where);
    
            $this->db->update($this->tables['users'], $data, array('id' => $id));
        }


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 03-01-2010, 12:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB