web\UserEvent $isValid

$isValid public property Whether the login or logout should proceed. Event handlers may modify this property to determine whether the login or logout should proceed. This property is only meaningful for yii\web\User::EVENT_BEFORE_LOGIN and yii\web\User::EVENT_BEFORE_LOGOUT events. public boolean $isValid = true

web\UserEvent $identity

$identity public property The identity object associated with this event public yii\web\IdentityInterface $identity = null

web\UserEvent $duration

$duration public property Number of seconds that the user can remain in logged-in status. If 0, it means login till the user closes the browser or the session is manually destroyed. public integer $duration = null

web\UserEvent $cookieBased

$cookieBased public property Whether the login is cookie-based. This property is only meaningful for yii\web\User::EVENT_BEFORE_LOGIN and yii\web\User::EVENT_AFTER_LOGIN events. public boolean $cookieBased = null

web\User switchIdentity()

switchIdentity() public method Switches to a new identity for the current user. When $enableSession is true, this method may use session and/or cookie to store the user identity information, according to the value of $duration. Please refer to login() for more details. This method is mainly called by login(), logout() and loginByCookie() when the current user needs to be associated with the corresponding identity information. public void switchIdentity ( $identity, $duration = 0 )$identit

web\User setReturnUrl()

setReturnUrl() public method Remembers the URL in the session so that it can be retrieved back later by getReturnUrl(). public void setReturnUrl ( $url )$url string|array The URL that the user should be redirected to after login. If an array is given, yii\web\UrlManager::createUrl() will be called to create the corresponding URL. The first element of the array should be the route, and the rest of the name-value pairs are GET parameters used to construct the URL. For example, ['admin/in

web\User setIdentity()

setIdentity() public method Sets the user identity object. Note that this method does not deal with session or cookie. You should usually use switchIdentity() to change the identity of the current user. public void setIdentity ( $identity )$identity yii\web\IdentityInterface|null The identity object associated with the currently logged user. If null, it means the current user will be a guest without any associated identity. throws yii\base\InvalidValueException if $identity object do

web\User sendIdentityCookie()

sendIdentityCookie() protected method Sends an identity cookie. This method is used when $enableAutoLogin is true. It saves $id, auth key, and the duration of cookie-based login information in the cookie. See also loginByCookie(). protected void sendIdentityCookie ( $identity, $duration )$identity yii\web\IdentityInterface $duration integer Number of seconds that the user can remain in logged-in status.

web\User renewIdentityCookie()

renewIdentityCookie() protected method Renews the identity cookie. This method will set the expiration time of the identity cookie to be the current time plus the originally specified cookie duration. protected void renewIdentityCookie ( )

web\User renewAuthStatus()

renewAuthStatus() protected method Updates the authentication status using the information from session and cookie. This method will try to determine the user identity using the $idParam session variable. If $authTimeout is set, this method will refresh the timer. If the user identity cannot be determined by session, this method will try to login by cookie if $enableAutoLogin is true. protected void renewAuthStatus ( )