You are here

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

Same name and namespace in other branches
  1. 8.2 ldap_authentication/LdapAuthenticationConfAdmin.class.php \LdapAuthenticationConfAdmin::populateFromDrupalForm()
  2. 7 ldap_authentication/LdapAuthenticationConfAdmin.class.php \LdapAuthenticationConfAdmin::populateFromDrupalForm()
2 calls to LdapAuthenticationConfAdmin::populateFromDrupalForm()
LdapAuthenticationConfAdmin::drupalFormSubmit in ldap_authentication/LdapAuthenticationConfAdmin.class.php
LdapAuthenticationConfAdmin::drupalFormValidate in ldap_authentication/LdapAuthenticationConfAdmin.class.php
Validate form, not object.

File

ldap_authentication/LdapAuthenticationConfAdmin.class.php, line 634

Class

LdapAuthenticationConfAdmin

Code

protected function populateFromDrupalForm($values) {
  $this->authenticationMode = $values['authenticationMode'] ? (int) $values['authenticationMode'] : NULL;
  $this->sids = $values['authenticationServers'];
  $this->allowOnlyIfTextInDn = $this
    ->linesToArray($values['allowOnlyIfTextInDn']);
  $this->excludeIfTextInDn = $this
    ->linesToArray($values['excludeIfTextInDn']);
  $this->allowTestPhp = $values['allowTestPhp'];
  $this->loginUIUsernameTxt = $values['loginUIUsernameTxt'] ? (string) $values['loginUIUsernameTxt'] : NULL;
  $this->loginUIPasswordTxt = $values['loginUIPasswordTxt'] ? (string) $values['loginUIPasswordTxt'] : NULL;
  $this->ldapUserHelpLinkUrl = $values['ldapUserHelpLinkUrl'] ? (string) $values['ldapUserHelpLinkUrl'] : NULL;
  $this->ldapUserHelpLinkText = $values['ldapUserHelpLinkText'] ? (string) $values['ldapUserHelpLinkText'] : NULL;
  $this->excludeIfNoAuthorizations = $values['excludeIfNoAuthorizations'] ? (int) $values['excludeIfNoAuthorizations'] : NULL;
  $this->emailOption = $values['emailOption'] ? (int) $values['emailOption'] : NULL;
  $this->emailUpdate = $values['emailUpdate'] ? (int) $values['emailUpdate'] : NULL;
  $this->passwordOption = $values['passwordOption'] ? (int) $values['passwordOption'] : NULL;
  $this->ssoExcludedPaths = $this
    ->linesToArray($values['ssoExcludedPaths']);
  $this->ssoExcludedHosts = $this
    ->linesToArray($values['ssoExcludedHosts']);
  $this->ssoRemoteUserStripDomainName = $values['ssoRemoteUserStripDomainName'] ? (int) $values['ssoRemoteUserStripDomainName'] : NULL;
  $this->seamlessLogin = $values['seamlessLogin'] ? (int) $values['seamlessLogin'] : NULL;
  $this->ssoNotifyAuthentication = $values['ssoNotifyAuthentication'] ? (int) $values['ssoNotifyAuthentication'] : NULL;
  $this->cookieExpire = $values['cookieExpire'] ? (int) $values['cookieExpire'] : NULL;
  $this->ldapImplementation = $values['ldapImplementation'] ? (string) $values['ldapImplementation'] : NULL;
  $this->emailTemplateHandling = $values['emailTemplateHandling'] ? (int) $values['emailTemplateHandling'] : NULL;
  $this->emailTemplate = $values['emailTemplate'] ? $values['emailTemplate'] : '';
  $this->templateUsagePromptUser = $values['templateUsagePromptUser'] ? 1 : 0;
  $this->templateUsageResolveConflict = $values['templateUsageResolveConflict'] ? 1 : 0;
  $this->templateUsagePromptRegex = $values['templateUsagePromptRegex'] ? $values['templateUsagePromptRegex'] : '';
  $this->templateUsageRedirectOnLogin = $values['templateUsageRedirectOnLogin'] ? 1 : 0;
  $this->templateUsageNeverUpdate = $values['templateUsageNeverUpdate'] ? 1 : 0;
}