web\User getIdentity()

getIdentity() public method

Returns the identity object associated with the currently logged-in user.

When $enableSession is true, this method may attempt to read the user's authentication data stored in session and reconstruct the corresponding identity object, if it has not done so before.

See also:

public yii\web\IdentityInterface|null getIdentity ( $autoRenew = true )
$autoRenew boolean

Whether to automatically renew authentication status if it has not been done so before. This is only useful when $enableSession is true.

return yii\web\IdentityInterface|null

The identity object associated with the currently logged-in user. null is returned if the user is not logged in (not authenticated).

doc_Yii
2016-10-30 17:17:21
Comments
Leave a Comment

Please login to continue.