Plugin Directory

Changeset 689834


Ignore:
Timestamp:
04/01/2013 06:23:40 AM (13 years ago)
Author:
Jesper800
Message:

Fixing roles access function issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • user-hierarchy/tags/0.1.1/lib/roles.php

    r689831 r689834  
    4848        $role_access = get_option('jwuh_role_access', array());
    4949       
    50         if (!is_array($role_access)) {
    51             return false;
    52         }
    53        
    54         if (!isset($role_access[$currentuser_role])) {
     50        if (!is_array($role_access) || !isset($role_access[$currentuser_role])) {
    5551            return false;
    5652        }
     
    5955        $role_access = $role_access[$currentuser_role];
    6056       
    61         if (!$role_access['enabled']) {
     57        if (!is_array($role_access) || !$role_access['enabled']) {
    6258            return false;
    6359        }
     
    145141        $role_access = JWUH_Roles::get_role_access();
    146142       
    147         if (!$role_access) {
    148             return;
     143        if (!$role_access || empty($role_access['roles'])) {
     144            return array();
    149145        }
    150146       
Note: See TracChangeset for help on using the changeset viewer.