main/authentication/Listener/Cas/ApiListener.php
public function onSerialize(DecorateUserEvent $event)
    {
        $casUserId = $this->casManager->getCasUserIdByUserId($event->getUser()->getId());

        $event->add('cas_data', [
            'id' => $casUserId,
        ]);
    }
public function onSerialize(DecorateUserEvent $event)
    {
        $casUserId = $this->casManager->getCasUserIdByUserId($event->getUser()->getId());

        $event->add('cas_data', [
            'id' => $casUserId,
        ]);
    }
public function onSerialize ( DecorateUserEvent $ event ) { $ casUserId = $ this -> casManager -> getCasUserIdByUserId ( $ event -> getUser ( ) -> getId ( ) ) ; $ event -> add ( 'cas_data' , [ 'id' => $ casUserId , ] ) ; }
Add CAS ID to serialized user.

@param DecorateUserEvent $event

@DI\Observe("serialize_user")
Add CAS ID to serialized user .