i send mobile number as username and active_code as password from view file(ajax) to action with jquery and i want login user with this data.
this code is my action:
$identity = \common\models\User::findOne(["username"=>$mobile]);
Yii::$app->user->login($identity);
it is worked but after page refreshed, it seems user not logged in!
is any way to do this?