You are here

class CasPostLoginEvent in CAS 8

Same name and namespace in other branches
  1. 2.x src/Event/CasPostLoginEvent.php \Drupal\cas\Event\CasPostLoginEvent

Class CasPostLoginEvent.

CAS dispatches this event during the authentication process after the user has been logged into Drupal.

Any CAS attributes will be available via the $casPropertyBag data object.

Hierarchy

  • class \Drupal\cas\Event\CasPostLoginEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of CasPostLoginEvent

1 file declares its use of CasPostLoginEvent
CasUserManager.php in src/Service/CasUserManager.php

File

src/Event/CasPostLoginEvent.php, line 17

Namespace

Drupal\cas\Event
View source
class CasPostLoginEvent extends Event {

  /**
   * Store the CAS property bag.
   *
   * @var \Drupal\cas\CasPropertyBag
   */
  protected $casPropertyBag;

  /**
   * The drupal user entity about to be logged in.
   *
   * @var \Drupal\user\UserInterface
   */
  protected $account;

  /**
   * Constructor.
   *
   * @param \Drupal\user\UserInterface $account
   *   The drupal user entity about to be logged in.
   * @param \Drupal\cas\CasPropertyBag $cas_property_bag
   *   The CasPropertyBag of the current login cycle.
   */
  public function __construct(UserInterface $account, CasPropertyBag $cas_property_bag) {
    $this->account = $account;
    $this->casPropertyBag = $cas_property_bag;
  }

  /**
   * CasPropertyBag getter.
   *
   * @return \Drupal\cas\CasPropertyBag
   *   The casPropertyBag property.
   */
  public function getCasPropertyBag() {
    return $this->casPropertyBag;
  }

  /**
   * Return the user account entity.
   *
   * @return \Drupal\user\UserInterface
   *   The user account entity.
   */
  public function getAccount() {
    return $this->account;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CasPostLoginEvent::$account protected property The drupal user entity about to be logged in.
CasPostLoginEvent::$casPropertyBag protected property Store the CAS property bag.
CasPostLoginEvent::getAccount public function Return the user account entity.
CasPostLoginEvent::getCasPropertyBag public function CasPropertyBag getter.
CasPostLoginEvent::__construct public function Constructor.