From e1dee38adce782dd44f4750ddd3ae34eaed5e688 Mon Sep 17 00:00:00 2001 From: AnasTHH Date: Sat, 21 Nov 2015 11:37:21 +0400 Subject: [PATCH] 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