You are here

class CasPreUserLoadEvent in CAS 8

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

Class CasPreUserLoadEvent.

The CAS module dispatches this event during the authentication process just before an attempt is made to find a local Drupal user account that's associated with the user attempting to login.

Subscribers to this event can:

  • Alter the CAS username that is used when looking up an existing Drupal user account.

Hierarchy

Expanded class hierarchy of CasPreUserLoadEvent

1 file declares its use of CasPreUserLoadEvent
ServiceController.php in src/Controller/ServiceController.php

File

src/Event/CasPreUserLoadEvent.php, line 19

Namespace

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

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

  /**
   * Constructor.
   *
   * @param \Drupal\cas\CasPropertyBag $cas_property_bag
   *   The CasPropertyBag of the current login cycle.
   */
  public function __construct(CasPropertyBag $cas_property_bag) {
    $this->casPropertyBag = $cas_property_bag;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
CasPreUserLoadEvent::$casPropertyBag protected property Store the CAS property bag.
CasPreUserLoadEvent::getCasPropertyBag public function CasPropertyBag getter.
CasPreUserLoadEvent::__construct public function Constructor.