The callback function will be passed a $logoutTicket as its first parameter,
followed by any $additionalArgs you pass. The $logoutTicket parameter is an
opaque string that can be used to map a session-id to the logout request
in order to support single-signout in applications that manage their own
sessions (rather than letting phpCAS start the session).
phpCAS::forceAuthentication() will always exit and forward client unless
they are already authenticated. To perform an action at the moment the user
logs in (such as registering an account, performing logging, etc), register
a callback function here.
/** * Set a callback function to be run when a user authenticates. * * The callback function will be passed a $logoutTicket as its first * parameter, followed by any $additionalArgs you pass. The $logoutTicket * parameter is an opaque string that can be used to map the session-id to * logout request in order to support single-signout in applications that * manage their own sessions (rather than letting phpCAS start the session). * * phpCAS::forceAuthentication() will always exit and forward client unless * they are already authenticated. To perform an action at the moment the user * logs in (such as registering an account, performing logging, etc), register * a callback function here. * * @param string $function Callback function * @param array $additionalArgs optional array of arguments * * @return void */ public static function setPostAuthenticateCallback($function, array $additionalArgs = array()) { phpCAS::_validateClientExists(); self::$_PHPCAS_CLIENT->setPostAuthenticateCallback($function, $additionalArgs); }