public function LdapUserManager::getUserDataByAccount in Lightweight Directory Access Protocol (LDAP) 8.4
Fetch user data from server by user account.
Parameters
\Drupal\user\UserInterface $account: Drupal user account.
Return value
\Symfony\Component\Ldap\Entry|false Returns entry or FALSE.
@todo This should go into LdapUserProcessor or LdapUserManager, leaning toward the former.
File
- ldap_servers/
src/ LdapUserManager.php, line 233
Class
- LdapUserManager
- LDAP User Manager.
Namespace
Drupal\ldap_serversCode
public function getUserDataByAccount(UserInterface $account) {
if (!$this
->checkAvailability()) {
return FALSE;
}
$identifier = $this->externalAuth
->get($account
->id(), 'ldap_user');
if ($identifier) {
return $this
->getUserDataByIdentifier($identifier);
}
return FALSE;
}