You are here

public static function SimpleLdapUser::singleton in Simple LDAP 7.2

Same name and namespace in other branches
  1. 7 simple_ldap_user/SimpleLdapUser.class.php \SimpleLdapUser::singleton()

Return a SimpleLdapUser object for the given username.

@throw SimpleLdapException

Parameters

string $name: The drupal user name or email address to search for, and load from LDAP.

boolean $reset: If TRUE, the cache for the specified user is cleared, and the user is reloaded from LDAP.

Return value

object SimpleLdapUser

23 calls to SimpleLdapUser::singleton()
hook_sync_user_to_ldap in simple_ldap_user/simple_ldap_user.api.php
Synchronizes a Drupal user to LDAP.
SimpleLdapRole::addUser in simple_ldap_role/SimpleLdapRole.class.php
Add an LDAP user to the LDAP group.
SimpleLdapRole::deleteUser in simple_ldap_role/SimpleLdapRole.class.php
Remove an LDAP user from the LDAP group.
SimpleLdapSSO::__construct in simple_ldap_sso/SimpleLdapSSO.class.php
Constructor.
SimpleLdapUserController::load in simple_ldap_user/SimpleLdapUserController.class.php
Verifies that the user exists in the LDAP directory.

... See full list

File

simple_ldap_user/SimpleLdapUser.class.php, line 390
Class defining a simple LDAP user.

Class

SimpleLdapUser
@file Class defining a simple LDAP user.

Code

public static function singleton($name, $reset = FALSE) {
  if ($reset || !isset(self::$users[$name])) {
    self::$users[$name] = new SimpleLdapUser($name);
  }
  return self::$users[$name];
}