You are here

public function LdapTestFunctions::configureLdapUser in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::configureLdapUser()

File

ldap_test/LdapTestFunctions.class.php, line 102

Class

LdapTestFunctions

Code

public function configureLdapUser($ldap_user_test_conf_id) {
  module_load_include('php', 'ldap_user', 'LdapUserConfAdmin.class');
  $ldapUserConfAdmin = new LdapUserConfAdmin();
  $options = $this->data['ldap_user'][$ldap_user_test_conf_id];
  foreach ($ldapUserConfAdmin->saveable as $prop_name) {
    if (isset($options[$prop_name])) {
      $ldapUserConfAdmin->{$prop_name} = $options[$prop_name];
    }
  }
  $ldapUserConfAdmin
    ->save();
}