You are here

public function CasPreRegisterEvent::cancelAutomaticRegistration in CAS 2.x

Cancels automatic registration.

Parameters

\Drupal\Component\Render\MarkupInterface|string|null $reason: The reason of automatic cancellation property to set.

1 call to CasPreRegisterEvent::cancelAutomaticRegistration()
CasPreRegisterEvent::setAllowAutomaticRegistration in src/Event/CasPreRegisterEvent.php
Sets the allow auto registration proprety.

File

src/Event/CasPreRegisterEvent.php, line 200

Class

CasPreRegisterEvent
Class CasPreRegisterEvent.

Namespace

Drupal\cas\Event

Code

public function cancelAutomaticRegistration($reason = NULL) : self {

  // Set the reason code into the property.
  $this->cancelRegistrationReason = $reason;

  // Deactivate the allow automatic registration.
  $this->allowAutomaticRegistration = FALSE;
  return $this;
}