From f0cf74ec517b24428f93a7b7029b94af17730bc0 Mon Sep 17 00:00:00 2001 From: Raphael Jackstadt Date: Fri, 24 Jul 2015 13:15:29 +0200 Subject: [PATCH] added return by delete_user() --- application/libraries/Aauth.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index d25df2c..2a366f5 100644 --- a/application/libraries/Aauth.php +++ b/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