There may be times when you want to check for a user's membership in a role or roles. The Solar_Role_Adapter has three simple methods related to this.
To use the methods, it's as simple as this:
$role = 'admin'; if (Solar_Registry::get('user')->role->is($role)) { // your code here } $roles = array('admin', 'editor'); if (Solar_Registry::get('user')->role->isAny($roles)) { // your code here } if (Solar_Registry::get('user')->role->isAll($roles)) { // your code here }