api added id in response to login
This commit is contained in:
parent
164771dc89
commit
faed561f9c
@ -67,7 +67,9 @@ class UserController extends ActiveController
|
||||
$model = new LoginForm();
|
||||
if ($model->load(Yii::$app->getRequest()->getBodyParams(), '') && $model->login()) {
|
||||
return [
|
||||
'access_token' => $model->login(), 'access_token_expired_at' => $model->getUser()->getTokenExpiredAt()
|
||||
'access_token' => $model->login(),
|
||||
'access_token_expired_at' => $model->getUser()->getTokenExpiredAt(),
|
||||
'id' => $model->getUser()->id,
|
||||
];
|
||||
} else {
|
||||
throw new BadRequestHttpException(json_encode($model->errors));
|
||||
|
Loading…
Reference in New Issue
Block a user