Projet

Général

Profil

Révision dd54aff9

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

htmltest/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConfAdmin.class.php
79 79
      LDAP_AUTHENTICATION_EMAIL_UPDATE_ON_LDAP_CHANGE_ENABLE => t('Update stored email if LDAP email differs at login but don\'t notify user.'),
80 80
      LDAP_AUTHENTICATION_EMAIL_UPDATE_ON_LDAP_CHANGE_DISABLE => t('Don\'t update stored email if LDAP email differs at login.'),
81 81
      );
82
    $values['emailTemplateHandlingOptions'] = array(
83
      LDAP_AUTHENTICATION_EMAIL_TEMPLATE_NONE => t('Never use the template.'),
84
      LDAP_AUTHENTICATION_EMAIL_TEMPLATE_IF_EMPTY => t('Use the template if no email address was provided by the LDAP server.'),
85
      LDAP_AUTHENTICATION_EMAIL_TEMPLATE_ALWAYS => t('Always use the template.'),
86
    );
82 87

  
83 88

  
84 89
    /**
......
182 187

  
183 188
  public $emailUpdateDefault = LDAP_AUTHENTICATION_EMAIL_UPDATE_ON_LDAP_CHANGE_ENABLE_NOTIFY;
184 189
  public $emailUpdateOptions;
185

  
190
  
191
  public $emailTemplateHandlingDefault = LDAP_AUTHENTICATION_EMAIL_TEMPLATE_DEFAULT;
192
  public $emailTemplateHandlingOptions;
193
  
194
  public $emailTemplateDefault = LDAP_AUTHENTICATION_DEFAULT_TEMPLATE;
195
  
196
  public $templateUsagePromptUserDefault = LDAP_AUTHENTICATION_TEMPLATE_USAGE_PROMPT_USER_DEFAULT;
197
  
198
  public $templateUsagePromptRegexDefault = LDAP_AUTHENTICATION_DEFAULT_TEMPLATE_REGEX;
199
  
200
  public $templateUsageNeverUpdateDefault = LDAP_AUTHENTICATION_TEMPLATE_USAGE_NEVER_UPDATE_DEFAULT;
186 201

  
187 202
   /**
188 203
   * 5. Single Sign-On / Seamless Sign-On
......
391 406
      '#default_value' => $this->emailUpdate,
392 407
      '#options' => $this->emailUpdateOptions,
393 408
      );
394

  
409
    
410
    $form['email']['template'] = array(
411
      '#type' => 'fieldset',
412
      '#collapsible' => TRUE,
413
      '#title' => t('Email Templates'),
414
    );
415
    
416
    $form['email']['template']['emailTemplateHandling'] = array(
417
      '#type' => 'radios',
418
      '#title' => t('Email Template Handling'),
419
      '#required' => 1,
420
      '#default_value' => $this->emailTemplateHandling,
421
      '#options' => $this->emailTemplateHandlingOptions
422
    );
423
    
424
    $form['email']['template']['emailTemplate'] = array(
425
      '#type' => 'textfield',
426
      '#title' => t('Email Template'),
427
      '#required' => 0,
428
      '#default_value' => $this->emailTemplate,
429
    );
430
    
431
    $form['email']['template']['templateUsageResolveConflict'] = array(
432
      '#type' => 'checkbox',
433
      '#title' => t('If a Drupal account already exists with the same email, but different account name, use the email template instead of the LDAP email.'),
434
      '#default_value' => $this->templateUsageResolveConflict,
435
    );
436
    
437
    $form['email']['template']['templateUsageNeverUpdate'] = array(
438
      '#type' => 'checkbox',
439
      '#title' => t('Ignore the Email Update settings and never update the stored email if the template is used.'),
440
      '#default_value' => $this->templateUsageNeverUpdate,
441
    );
442
    
443
    $form['email']['prompts'] = array(
444
      '#type' => 'fieldset',
445
      '#collapsible' => TRUE,
446
      '#title' => t('User Email Prompt'),
447
      '#description' => t('These settings allow the user to fill in their email address after logging in if the template was used to generate their email address.'),      
448
    );
449
    
450
    $form['email']['prompts']['templateUsagePromptUser'] = array(
451
      '#type' => 'checkbox',
452
      '#title' => t('Prompt user for email on every page load.'),
453
      '#default_value' => $this->templateUsagePromptUser,
454
    );
455
    
456
    $form['email']['prompts']['templateUsageRedirectOnLogin'] = array(
457
      '#type' => 'checkbox',
458
      '#title' => t('Redirect the user to the form after logging in.'),
459
      '#default_value' => $this->templateUsageRedirectOnLogin,
460
    );
461
    
462
    $form['email']['prompts']['templateUsagePromptRegex'] = array(
463
      '#type' => 'textfield',
464
      '#default_value' => $this->templateUsagePromptRegex,
465
      '#title' => t('Template Regex'),
466
      '#description' => t('This regex will be used to determine if the template was used to create an account.'),
467
    );
468
    
395 469

  
396 470
    $form['password'] = array(
397 471
      '#type' => 'fieldset',
......
559 633
    $this->ssoNotifyAuthentication = ($values['ssoNotifyAuthentication']) ? (int)$values['ssoNotifyAuthentication'] : NULL;
560 634
    $this->cookieExpire = ($values['cookieExpire']) ? (int)$values['cookieExpire'] : NULL;
561 635
    $this->ldapImplementation = ($values['ldapImplementation']) ? (string)$values['ldapImplementation'] : NULL;
636
    $this->emailTemplateHandling = ($values['emailTemplateHandling']) ? (int) $values['emailTemplateHandling'] : NULL;
637
    $this->emailTemplate = ($values['emailTemplate']) ? $values['emailTemplate'] : '';
638
    $this->templateUsagePromptUser = ($values['templateUsagePromptUser']) ? 1 : 0;
639
    $this->templateUsageResolveConflict = ($values['templateUsageResolveConflict']) ? 1 : 0;
640
    $this->templateUsagePromptRegex = ($values['templateUsagePromptRegex']) ? $values['templateUsagePromptRegex'] : '';
641
    $this->templateUsageRedirectOnLogin = ($values['templateUsageRedirectOnLogin']) ? 1 : 0;
642
    $this->templateUsageNeverUpdate = ($values['templateUsageNeverUpdate']) ? 1 : 0;
562 643
  }
563 644

  
564 645
  public function drupalFormSubmit($values) {

Formats disponibles : Unified diff