public static function SimpleLdapRole::singleton in Simple LDAP 7
Same name and namespace in other branches
- 7.2 simple_ldap_role/SimpleLdapRole.class.php \SimpleLdapRole::singleton()
Return a SimpleLdapRole object for the given role name.
@throw SimpleLdapException
Parameters
string $name: The Drupal role name to search for, and load from LDAP.
boolen $reset: If TRUE, the cache for the specified role is cleared, and the role is reloaded from LDAP.
Return value
object SimpleLdapRole
5 calls to SimpleLdapRole::singleton()
- simple_ldap_role_sync_user_to_ldap in simple_ldap_role/
simple_ldap_role.module - Implements hook_sync_user_to_ldap().
- simple_ldap_role_user_presave in simple_ldap_role/
simple_ldap_role.module - Implements hook_user_presave().
- simple_ldap_role_user_role_delete in simple_ldap_role/
simple_ldap_role.module - Implements hook_user_role_delete().
- simple_ldap_role_user_role_insert in simple_ldap_role/
simple_ldap_role.module - Implements hook_user_role_insert().
- simple_ldap_role_user_role_presave in simple_ldap_role/
simple_ldap_role.module - Implements hook_user_role_presave().
File
- simple_ldap_role/
SimpleLdapRole.class.php, line 384 - SimpleLdapRole class file.
Class
- SimpleLdapRole
- @file SimpleLdapRole class file.
Code
public static function singleton($name, $reset = FALSE) {
if ($reset || !isset(self::$roles[$name])) {
self::$roles[$name] = new SimpleLdapRole($name);
}
return self::$roles[$name];
}