Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Jackstadt committed Sep 11, 2014
1 parent 27fd0a8 commit 44cefd4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,12 @@ public function update_group($group_par, $group_name) {
public function delete_group($group_par) {

$group_id = $this->get_group_id($group_par);

$this->CI->db->where('id',$group_id);
$query = $this->CI->db->get($this->config_vars['groups']);
if ($query->num_rows() == 0){
return false;
}

// bug fixed
// now users are deleted from user_to_group table
Expand Down Expand Up @@ -1174,11 +1180,11 @@ public function delete_perm($perm_par) {
$perm_id = $this->get_perm_id($perm_par);

// deletes from perm_to_gropup table
$this->CI->db->where('pern_id', $perm_id);
$this->CI->db->where('perm_id', $perm_id);
$this->CI->db->delete($this->config_vars['perm_to_group']);

// deletes from perm_to_user table
$this->CI->db->where('pern_id', $perm_id);
$this->CI->db->where('perm_id', $perm_id);
$this->CI->db->delete($this->config_vars['perm_to_group']);

// deletes from permission table
Expand Down Expand Up @@ -1253,7 +1259,7 @@ public function is_group_allowed($perm_par, $group_par=false){
// if is not login
if (!$this->is_loggedin()){return false;}

$group_pars = $this->list_groups( $this->CI->session->userdata('id') );
$group_pars = $this->get_user_groups();

foreach ($group_pars as $g ){
if($this->is_group_allowed($perm_id, $g -> id)){
Expand Down Expand Up @@ -1697,7 +1703,7 @@ public function set_user_var( $key, $value, $user_id = false ) {
}

// if var not set, set
if ( ! $this->get_user_var($key,$user_id) ) {
if ($this->get_user_var($key,$user_id) ===false) {

$data = array(
'key' => $key,
Expand Down

0 comments on commit 44cefd4

Please sign in to comment.