You are here

public function CasPreLoginEvent::setAllowLogin in CAS 8

Set the $allowLogin property.

Parameters

bool $allow_login: TRUE to allow login, FALSE otherwise.

Deprecated

in cas:8.x-1.7 and is removed from cas:8.x-2.0. Use ::allowLogin() or ::cancelLogin() instead.

File

src/Event/CasPreLoginEvent.php, line 125

Class

CasPreLoginEvent
Class CasPreLoginEvent.

Namespace

Drupal\cas\Event

Code

public function setAllowLogin($allow_login) {
  @trigger_error('Using ' . __METHOD__ . '() is deprecated in cas:8.x-1.7 and is removed from cas:8.x-2.0. Use ::allowLogin() or ::cancelLogin() instead.', E_USER_DEPRECATED);
  if ($allow_login) {
    $this
      ->allowLogin();
  }
  else {
    $this
      ->cancelLogin();
  }
}