Detailed Description
Definition at line 5 of file AccessRule.php.
Member Function Documentation
AccessRule::isUserMatched |
( |
|
$user | ) |
|
|
protected |
Checks if user is matched
- Parameters
-
- Returns
- boolean whether the rule applies to the user
Definition at line 14 of file AccessRule.php.
{
if (empty($this->users)) {
return true;
}
foreach ($this->users as $u) {
if ($u==='*') {
return true;
} else if ($u==='?' && $user->getIsGuest()) {
return true;
} else if ($u==='@' && !$user->getIsGuest()) {
return true;
} else if (!strcasecmp($u, $user->getEmail())) {
return true;
}
}
return false;
}
The documentation for this class was generated from the following file: