You are here

public function CasLoginException::setSubscriberCancelReason in CAS 8

Same name and namespace in other branches
  1. 2.x src/Exception/CasLoginException.php \Drupal\cas\Exception\CasLoginException::setSubscriberCancelReason()

Sets a user message when login failed on a subscriber cancellation.

Parameters

\Drupal\Component\Render\MarkupInterface|string $reason: A user message to be set along with the exception.

Return value

$this

File

src/Exception/CasLoginException.php, line 55

Class

CasLoginException
Class CasLoginException.

Namespace

Drupal\cas\Exception

Code

public function setSubscriberCancelReason($reason) {
  if ($this
    ->getCode() === self::SUBSCRIBER_DENIED_LOGIN) {
    $this->subscriberCancelReason = $reason;
  }
  return $this;
}