public function LdapUserIntegrationTests::createLdapIdentifiedDrupalAccount in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_user/tests/ldap_user.test \LdapUserIntegrationTests::createLdapIdentifiedDrupalAccount()
1 call to LdapUserIntegrationTests::createLdapIdentifiedDrupalAccount()
- LdapUserIntegrationTests::testDrupalAccountsOrphaned in ldap_user/
tests/ ldap_user.test - Test cron function for dealing with ldap associated users who no longer have ldap entries
File
- ldap_user/
tests/ ldap_user.test, line 1213
Class
Code
public function createLdapIdentifiedDrupalAccount($ldap_user_conf, $name, $sid) {
$account = NULL;
$user_edit = [
'name' => $name,
];
$user = $ldap_user_conf
->provisionDrupalAccount($account, $user_edit, NULL, TRUE);
return user_load($user->uid, TRUE);
}