public function ServerFactory::getUserDataFromServerByAccount in Lightweight Directory Access Protocol (LDAP) 8.3
Fetch user data from server by user account.
Parameters
\Drupal\user\UserInterface $account: Drupal user account.
string $id: Server id.
string $ldap_context: Provisioning direction.
Return value
array|bool Returns data or FALSE.
1 call to ServerFactory::getUserDataFromServerByAccount()
- ServerFactory::getUserDataByAccount in ldap_servers/
src/ ServerFactory.php - Fetch user data from account.
File
- ldap_servers/
src/ ServerFactory.php, line 152
Class
- ServerFactory
- Helper class to working with the Server classes.
Namespace
Drupal\ldap_serversCode
public function getUserDataFromServerByAccount(UserInterface $account, $id, $ldap_context = NULL) {
$identifier = ExternalAuthenticationHelper::getUserIdentifierFromMap($account
->id());
if ($identifier) {
// TODO: Fix parameters.
return $this
->getUserDataFromServerByIdentifier($identifier, $id, $ldap_context);
}
else {
return FALSE;
}
}