From 515945b11a075b96004cd4205972b4579042d606 Mon Sep 17 00:00:00 2001 From: Raphael Jackstadt Date: Fri, 5 Jun 2015 04:54:28 +0200 Subject: [PATCH] fixed issue #42 --- application/libraries/Aauth.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 4e47312..34aaa1d 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1105,16 +1105,19 @@ class Aauth { $group_id = $this->get_group_id($group_par); - $this->aauth_db->where('id',$group_id); - $query = $this->aauth_db->get($this->config_vars['groups']); - if ($query->num_rows() == 0){ - return FALSE; - } + $this->aauth_db->where('id',$group_id); + $query = $this->aauth_db->get($this->config_vars['groups']); + if ($query->num_rows() == 0){ + return FALSE; + } // bug fixed // now users are deleted from user_to_group table $this->aauth_db->where('group_id', $group_id); $this->aauth_db->delete($this->config_vars['user_to_group']); + + $this->aauth_db->where('group_id', $group_id); + $this->aauth_db->delete($this->config_vars['perm_to_group']); $this->aauth_db->where('id', $group_id); return $this->aauth_db->delete($this->config_vars['groups']); @@ -1334,7 +1337,7 @@ class Aauth { // deletes from perm_to_user table $this->aauth_db->where('perm_id', $perm_id); - $this->aauth_db->delete($this->config_vars['perm_to_group']); + $this->aauth_db->delete($this->config_vars['perm_to_user']); // deletes from permission table $this->aauth_db->where('id', $perm_id);