Skip to content

Commit

Permalink
added return by delete_user()
Browse files Browse the repository at this point in the history
  • Loading branch information
REJack committed Jul 24, 2015
1 parent bcbf28b commit f0cf74e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,12 +923,10 @@ public function send_verification($user_id){
* 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']);
Expand All @@ -940,6 +938,11 @@ public function delete_user($user_id) {
// 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
Expand Down

0 comments on commit f0cf74e

Please sign in to comment.