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 does not implement yii\web\IdentityInterface.

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

Please login to continue.