You are here

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

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

File

ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php, line 686

Class

LdapAuthorizationConsumerConfAdmin
LDAP Authorization Consumer Configration Admin Class

Code

protected function populateFromDrupalForm($op, $values) {
  $this->inDatabase = drupal_strtolower($op) == 'edit' || drupal_strtolower($op) == 'save';
  $values['mappings'] = $this
    ->pipeListToArray($values['mappings'], FALSE);
  $values['derive_from_attr_attr'] = $this
    ->linesToArray($values['derive_from_attr_attr']);
  $values['derive_from_entry_entries'] = $this
    ->linesToArray($values['derive_from_entry_entries']);
  $this->sid = $values['sid'];
  $this->consumerType = $values['consumer_type'];
  $this->status = (bool) $values['status'];
  $this->onlyApplyToLdapAuthenticated = (bool) @$values['only_ldap_authenticated'];
  $this->deriveFromDn = (bool) @$values['derive_from_dn'];
  $this->deriveFromDnAttr = $values['derive_from_dn_attr'];
  $this->deriveFromAttr = (bool) $values['derive_from_attr'];
  $this->deriveFromAttrAttr = $values['derive_from_attr_attr'];
  $this->deriveFromAttrUseFirstAttr = (bool) $values['derive_from_attr_use_first_attr'];
  $this->deriveFromAttrNested = (bool) $values['derive_from_attr_nested'];
  $this->deriveFromEntry = (bool) @$values['derive_from_entry'];
  $this->deriveFromEntryEntries = $values['derive_from_entry_entries'];
  $this->deriveFromEntryEntriesAttr = $values['derive_from_entry_entries_attr'];
  $this->deriveFromEntryMembershipAttr = $values['derive_from_entry_attr'];
  $this->deriveFromEntryAttrMatchingUserAttr = $values['derive_from_entry_user_ldap_attr'];
  $this->deriveFromEntryUseFirstAttr = (bool) $values['derive_from_entry_use_first_attr'];
  $this->deriveFromEntrySearchAll = (bool) $values['derive_from_entry_search_all'];
  $this->deriveFromEntryNested = (bool) $values['derive_from_entry_nested'];
  $this->mappings = $values['mappings'];
  $this->useMappingsAsFilter = (bool) @$values['use_filter'];
  $this->synchOnLogon = (bool) @$values['synchronization_modes']['user_logon'];
  $this->regrantLdapProvisioned = (bool) @$values['synchronization_actions']['regrant_ldap_provisioned'];
  $this->revokeLdapProvisioned = (bool) @$values['synchronization_actions']['revoke_ldap_provisioned'];
  $this->createConsumers = (bool) @$values['synchronization_actions']['create_consumers'];
}