diff options
| author | santo spider <spider@santo> | 2014-05-08 23:15:06 -0400 |
|---|---|---|
| committer | santo spider <spider@santo> | 2014-05-08 23:15:06 -0400 |
| commit | c19c3f6f35aff0a96afd53340d55923456e3ca76 (patch) | |
| tree | 401150927b490a3cb2e913df053328dc5bb4afa6 | |
| parent | 319a78ca5247207b3e393e4b454302a34655d9aa (diff) | |
| parent | f4b5f0c59da02d6aae327b5c05c356739bb92a23 (diff) | |
| download | users-c19c3f6f35aff0a96afd53340d55923456e3ca76.tar.gz users-c19c3f6f35aff0a96afd53340d55923456e3ca76.tar.bz2 users-c19c3f6f35aff0a96afd53340d55923456e3ca76.zip | |
Merge branch 'master' of github.com:bitweaver/users
| -rw-r--r-- | BitPermUser.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/BitPermUser.php b/BitPermUser.php index 574139d..7199ff3 100644 --- a/BitPermUser.php +++ b/BitPermUser.php @@ -519,9 +519,11 @@ class BitPermUser extends BitUser { $currentUserGroups = $this->getGroups( $pUserId ); foreach( $addGroups AS $groupId ) { $isInGroup = FALSE; - foreach( $currentUserGroups as $curGroupId => $curGroupInfo ) { - if( $curGroupId == $groupId ) { - $isInGroup = TRUE; + if( $currentUserGroups ) { + foreach( $currentUserGroups as $curGroupId => $curGroupInfo ) { + if( $curGroupId == $groupId ) { + $isInGroup = TRUE; + } } } if( !$isInGroup ) { |
