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 |
Please login to continue.