You are here

public function CasPreRegisterEvent::setAllowAutomaticRegistration in CAS 2.x

Same name and namespace in other branches
  1. 8 src/Event/CasPreRegisterEvent.php \Drupal\cas\Event\CasPreRegisterEvent::setAllowAutomaticRegistration()

Sets the allow auto registration proprety.

Parameters

bool $allow_automatic_registration: TRUE to allow auto registration, FALSE to deny it.

See also

https://www.drupal.org/project/cas/issues/3221111

File

src/Event/CasPreRegisterEvent.php, line 120

Class

CasPreRegisterEvent
Class CasPreRegisterEvent.

Namespace

Drupal\cas\Event

Code

public function setAllowAutomaticRegistration($allow_automatic_registration) {
  @trigger_error('CasPreRegisterEvent::setAllowAutomaticRegistration() is deprecated in cas:2.0.0 and is removed from cas:3.0.0. Instead, use \\Drupal\\cas\\Event\\CasPreRegisterEvent::allowAutomaticRegistration() or \\Drupal\\cas\\Event\\CasPreRegisterEvent::cancelAutomaticRegistration(). See https://www.drupal.org/project/cas/issues/3221111', E_USER_DEPRECATED);
  if ($allow_automatic_registration) {
    $this
      ->allowAutomaticRegistration();
  }
  else {
    $this
      ->cancelAutomaticRegistration();
  }
}