Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Protected Member Functions | List of all members
AccessRule Class Reference

Protected Member Functions

 isUserMatched ($user)

Detailed Description

Definition at line 5 of file AccessRule.php.

Member Function Documentation

AccessRule::isUserMatched (   $user)
protected

Checks if user is matched

Parameters
IWebUser$userthe user
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: