diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-11-18 14:19:43 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-11-18 14:19:43 -0500 |
commit | d07df8a7964e08d1af9e7bd762f2ac07035d9856 (patch) | |
tree | 954e19d9cd996e014ae69dd26ea885618ca7f9cd /classes | |
parent | 1d6bacc681eca89b7c20bb96fbacf5bcb8434d88 (diff) |
Added Authorization plugin
Added LDAPAuthorization plugin
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Profile.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/classes/Profile.php b/classes/Profile.php index 1b9cdb52f..4b2e09006 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -594,9 +594,14 @@ class Profile extends Memcached_DataObject function hasRole($name) { - $role = Profile_role::pkeyGet(array('profile_id' => $this->id, - 'role' => $name)); - return (!empty($role)); + $has_role = false; + if (Event::handle('StartHasRole', array($this, $name, &$has_role))) { + $role = Profile_role::pkeyGet(array('profile_id' => $this->id, + 'role' => $name)); + $has_role = !empty($role); + Event::handle('EndHasRole', array($this, $name, $has_role)); + } + return $has_role; } function grantRole($name) |