public function CasAttributesSubscriber::onPostLogin in CAS Attributes 8
Same name and namespace in other branches
- 2.x src/Subscriber/CasAttributesSubscriber.php \Drupal\cas_attributes\Subscriber\CasAttributesSubscriber::onPostLogin()
Save attributes to user session if sitewide token support is enabled.
Parameters
\Drupal\cas\Event\CasPostLoginEvent $casPostLoginEvent: The post login event from CAS.
File
- src/
Subscriber/ CasAttributesSubscriber.php, line 354
Class
- CasAttributesSubscriber
- Provides a CasAttributesSubscriber.
Namespace
Drupal\cas_attributes\SubscriberCode
public function onPostLogin(CasPostLoginEvent $casPostLoginEvent) {
if ($this->settings
->get('sitewide_token_support')) {
$session = $this->requestStack
->getCurrentRequest()
->getSession();
$session
->set('cas_attributes', $casPostLoginEvent
->getCasPropertyBag()
->getAttributes());
}
}