You are here

protected function LdapUserConfAdmin::populateFromDrupalForm in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_user/LdapUserConfAdmin.class.php \LdapUserConfAdmin::populateFromDrupalForm()

Populate object with data from form values.

Parameters

array $values: as $form_state['values'] from drupal form api.

array $storage: as $form_state['storage'] from drupal form api.

2 calls to LdapUserConfAdmin::populateFromDrupalForm()
LdapUserConfAdmin::drupalFormSubmit in ldap_user/LdapUserConfAdmin.class.php
Method to respond to successfully validated form submit.
LdapUserConfAdmin::drupalFormValidate in ldap_user/LdapUserConfAdmin.class.php
Validate submitted form.

File

ldap_user/LdapUserConfAdmin.class.php, line 563

Class

LdapUserConfAdmin

Code

protected function populateFromDrupalForm($values, $storage) {
  $this->drupalAcctProvisionServer = $values['drupalAcctProvisionServer'] == 'none' ? 0 : $values['drupalAcctProvisionServer'];
  $this->ldapEntryProvisionServer = $values['ldapEntryProvisionServer'] == 'none' ? 0 : $values['ldapEntryProvisionServer'];
  $this->drupalAcctProvisionTriggers = $values['drupalAcctProvisionTriggers'];
  $this->ldapEntryProvisionTriggers = $values['ldapEntryProvisionTriggers'];
  $this->orphanedDrupalAcctBehavior = $values['orphanedDrupalAcctBehavior'];
  $this->orphanedCheckQty = $values['orphanedCheckQty'];
  $this->manualAccountConflict = $values['manualAccountConflict'];
  $this->userConflictResolve = $values['userConflictResolve'] ? (int) $values['userConflictResolve'] : NULL;
  $this->accountsWithSameEmail = $values['accountsWithSameEmail'] ? (int) $values['accountsWithSameEmail'] : NULL;
  $this->acctCreation = $values['acctCreation'] ? (int) $values['acctCreation'] : NULL;
  $this->disableAdminPasswordField = $values['disableAdminPasswordField'];
  $this->ldapUserSynchMappings = $this
    ->synchMappingsFromForm($values, $storage);
}