public function CasLoginException::setSubscriberCancelReason in CAS 2.x
Same name and namespace in other branches
- 8 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
- Exception occurring on login failure.
Namespace
Drupal\cas\ExceptionCode
public function setSubscriberCancelReason($reason) {
$code = $this
->getCode();
if ($code === self::SUBSCRIBER_DENIED_LOGIN || $code === self::SUBSCRIBER_DENIED_REG) {
$this->subscriberCancelReason = $reason;
}
return $this;
}