function configureAuthentication($options)
 {
     require_once drupal_get_path('module', 'ldap_authentication') . '/LdapAuthenticationConfAdmin.class.php';
     $ldapServerAdmin = new LdapAuthenticationConfAdmin();
     foreach ($ldapServerAdmin->saveable as $prop_name) {
         if (isset($options[$prop_name])) {
             $ldapServerAdmin->{$prop_name} = $options[$prop_name];
         }
     }
     $ldapServerAdmin->save();
 }
示例#2
0
 function configureLdapAuthentication($ldap_authentication_test_conf_id, $sids)
 {
     module_load_include('php', 'ldap_authentication', 'LdapAuthenticationConfAdmin.class');
     $options = $this->data['ldap_authentication'][$ldap_authentication_test_conf_id];
     foreach ($sids as $i => $sid) {
         $options['sids'][$sid] = $sid;
     }
     $ldapServerAdmin = new LdapAuthenticationConfAdmin();
     foreach ($ldapServerAdmin->saveable as $prop_name) {
         if (isset($options[$prop_name])) {
             $ldapServerAdmin->{$prop_name} = $options[$prop_name];
         }
     }
     $ldapServerAdmin->save();
 }