protected function LdapUserConfAdmin::populateFromDrupalForm in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.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 583
Class
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->acctCreation = $values['acctCreation'] ? (int) $values['acctCreation'] : NULL;
// $this->wsKey = ($values['wsKey']) ? $values['wsKey'] : NULL;
// $this->wsUserIps = ($values['wsUserIps']) ? explode("\n", $values['wsUserIps']) : array();
// foreach ($this->wsUserIps as $i => $ip) {
// $this->wsUserIps[$i] = trim($ip);
// }
// $this->wsEnabled = ($values['wsEnabled']) ? (int)$values['wsEnabled'] : 0;
$this->ldapUserSynchMappings = $this
->synchMappingsFromForm($values, $storage);
}