Browse Source

added return by delete_user()

develop
Raphael Jackstadt 10 years ago
parent
commit
f0cf74ec51
  1. 9
      application/libraries/Aauth.php

9
application/libraries/Aauth.php

@ -923,12 +923,10 @@ class Aauth {
* Delete user
* Delete a user from database. WARNING Can't be undone
* @param int $user_id User id to delete
* @return bool Delete fails/succeeds
*/
public function delete_user($user_id) {
$this->aauth_db->where('id', $user_id);
$this->aauth_db->delete($this->config_vars['users']);
// delete from perm_to_user
$this->aauth_db->where('user_id', $user_id);
$this->aauth_db->delete($this->config_vars['perm_to_user']);
@ -940,6 +938,11 @@ class Aauth {
// delete user vars
$this->aauth_db->where('user_id', $user_id);
$this->aauth_db->delete($this->config_vars['user_variables']);
// delete user
$this->aauth_db->where('id', $user_id);
return $this->aauth_db->delete($this->config_vars['users']);
}
//tested

Loading…
Cancel
Save