Slight performance tweak.
This commit is contained in:
parent
cc86d66705
commit
98960353c4
1 changed files with 1 additions and 3 deletions
|
|
@ -90,12 +90,10 @@ sub isInGroup {
|
|||
if ($uid eq "") {
|
||||
$uid = $session{user}{userId};
|
||||
}
|
||||
($result) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId='$gid' and userId='$uid' and expireDate>".time());
|
||||
|
||||
if ($gid == 7) {
|
||||
return 1; # If the "Everyone" group is specified then return true regardless of the user.
|
||||
}
|
||||
|
||||
($result) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId='$gid' and userId='$uid' and expireDate>".time());
|
||||
if ($result < 1 && $gid != 3) { # admins can
|
||||
$result = isInGroup(3, $uid); # do anything any
|
||||
} # user can do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue