function LdapUserConf::load in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_user/LdapUserConf.class.php \LdapUserConf::load()
1 call to LdapUserConf::load()
- LdapUserConf::__construct in ldap_user/
LdapUserConf.class.php
File
- ldap_user/
LdapUserConf.class.php, line 219
Class
Code
function load() {
if ($saved = variable_get("ldap_user_conf", FALSE)) {
$this->inDatabase = TRUE;
foreach ($this->saveable as $property) {
if (isset($saved[$property])) {
$this->{$property} = $saved[$property];
}
}
}
else {
$this->inDatabase = FALSE;
}
// determine account creation configuration
$user_register = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
if ($this->acctCreation == LDAP_USER_ACCT_CREATION_LDAP_BEHAVIOR_DEFAULT || $user_register == USER_REGISTER_VISITORS) {
$this->createLDAPAccounts = TRUE;
$this->createLDAPAccountsAdminApproval = FALSE;
}
elseif ($user_register == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) {
$this->createLDAPAccounts = FALSE;
$this->createLDAPAccountsAdminApproval = TRUE;
}
else {
$this->createLDAPAccounts = FALSE;
$this->createLDAPAccountsAdminApproval = FALSE;
}
}