From e1dee38adce782dd44f4750ddd3ae34eaed5e688 Mon Sep 17 00:00:00 2001 From: AnasTHH Date: Sat, 21 Nov 2015 11:37:21 +0400 Subject: [PATCH 1/3] Added a function to remove member from all groups --- application/libraries/Aauth.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 0ecff64..4d68ef8 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1281,7 +1281,20 @@ class Aauth { $this->aauth_db->where('group_id', $group_par); return $this->aauth_db->delete($this->config_vars['user_to_group']); } + + //tested + /** + * Remove member + * Remove a user from all groups + * @param int $user_id User id to remove from all groups + * @return bool Remove success/failure + */ + public function remove_member_allgroups($user_id) { + $group_par = $this->get_group_id($group_par); + $this->aauth_db->where('user_id', $user_id); + return $this->aauth_db->delete($this->config_vars['user_to_group']); + } //tested /** * Is member From 09c1ffa481924b5306e10dad49db5d79ae0f590a Mon Sep 17 00:00:00 2001 From: AnasTHH Date: Sat, 21 Nov 2015 11:50:05 +0400 Subject: [PATCH 2/3] Update Aauth.php --- application/libraries/Aauth.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 4d68ef8..0968f13 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1291,7 +1291,6 @@ class Aauth { */ public function remove_member_allgroups($user_id) { - $group_par = $this->get_group_id($group_par); $this->aauth_db->where('user_id', $user_id); return $this->aauth_db->delete($this->config_vars['user_to_group']); } From a775982cb8369230ac5039f26d8e0cc91f55ed06 Mon Sep 17 00:00:00 2001 From: AnasTHH Date: Tue, 2 Feb 2016 04:38:32 +0400 Subject: [PATCH 3/3] Update Aauth.php --- application/libraries/Aauth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 0968f13..493dd62 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1289,7 +1289,7 @@ class Aauth { * @param int $user_id User id to remove from all groups * @return bool Remove success/failure */ - public function remove_member_allgroups($user_id) { + public function remove_member_from_all($user_id) { $this->aauth_db->where('user_id', $user_id); return $this->aauth_db->delete($this->config_vars['user_to_group']);