You are here

protected function LdapServerAdmin::populateFromDrupalForm in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::populateFromDrupalForm()
  2. 7.2 ldap_servers/LdapServerAdmin.class.php \LdapServerAdmin::populateFromDrupalForm()
3 calls to LdapServerAdmin::populateFromDrupalForm()
LdapServerAdmin::drupalFormSubmit in ldap_servers/LdapServerAdmin.class.php
LdapServerAdmin::drupalFormValidate in ldap_servers/LdapServerAdmin.class.php
LdapServerAdmin::drupalFormWarnings in ldap_servers/LdapServerAdmin.class.php

File

ldap_servers/LdapServerAdmin.class.php, line 52

Class

LdapServerAdmin

Code

protected function populateFromDrupalForm($op, $values) {
  $this->inDatabase = $op == 'edit';
  $this->sid = trim($values['sid']);
  $this->name = trim($values['name']);
  $this->status = $values['status'] ? 1 : 0;
  $this->ldap_type = trim($values['ldap_type']);
  $this->address = trim($values['address']);
  $this->port = trim($values['port']);
  $this->tls = trim($values['tls']);
  $this->bind_method = trim($values['bind_method']);
  $this->binddn = trim($values['binddn']);
  if (trim($values['bindpw'])) {
    $this->bindpw_new = trim($values['bindpw']);
  }
  $this->user_dn_expression = trim($values['user_dn_expression']);
  $this->basedn = $this
    ->linesToArray(trim($values['basedn']));
  $this->user_attr = trim($values['user_attr']);
  $this->account_name_attr = trim($values['account_name_attr']);
  $this->mail_attr = trim($values['mail_attr']);
  $this->mail_template = trim($values['mail_template']);
  $this->unique_persistent_attr = trim($values['unique_persistent_attr']);
  $this->allow_conflicting_drupal_accts = trim($values['allow_conflicting_drupal_accts']);
  $this->ldapToDrupalUserPhp = $values['ldap_to_drupal_user'];
  $this->testingDrupalUsername = trim($values['testing_drupal_username']);
  $this->groupObjectClass = trim($values['group_object_category']);
  $this->searchPagination = $values['search_pagination'] ? 1 : 0;
  $this->searchPageSize = trim($values['search_page_size']);
}