You are here

public function LdapServer::userUserToExistingLdapEntry in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_servers/LdapServer.class.php \LdapServer::userUserToExistingLdapEntry()
7 calls to LdapServer::userUserToExistingLdapEntry()
LdapServer::groupAddMember in ldap_servers/LdapServer.class.php
NOT TESTED add a member to a group.
LdapServer::groupMembershipsFromUser in ldap_servers/LdapServer.class.php
Get list of all groups that a user is a member of.
LdapServer::groupRemoveMember in ldap_servers/LdapServer.class.php
NOT TESTED remove a member from a group.
LdapServer::groupUserMembershipsFromDn in ldap_servers/LdapServer.class.php
Get "groups" from derived from DN. Has limited usefulness.
LdapServer::groupUserMembershipsFromEntry in ldap_servers/LdapServer.class.php
Get list of all groups that a user is a member of by querying groups.

... See full list

File

ldap_servers/LdapServer.class.php, line 1324
Defines server classes and related functions.

Class

LdapServer
LDAP Server Class.

Code

public function userUserToExistingLdapEntry($user) {
  if (is_object($user)) {
    $user_ldap_entry = $this
      ->userUserNameToExistingLdapEntry($user->name);
  }
  elseif (is_array($user)) {
    $user_ldap_entry = $user;
  }
  elseif (is_scalar($user)) {

    // Username.
    if (strpos($user, '=') === FALSE) {
      $user_ldap_entry = $this
        ->userUserNameToExistingLdapEntry($user);
    }
    else {
      $user_ldap_entry = $this
        ->dnExists($user, 'ldap_entry');
    }
  }
  return $user_ldap_entry;
}