mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Добавлена передача email при входе в неактивированный аккаунт
This commit is contained in:
@ -36,10 +36,16 @@ class AuthenticationController extends Controller {
|
||||
$model = new LoginForm();
|
||||
$model->load(Yii::$app->request->post());
|
||||
if (($jwt = $model->login()) === false) {
|
||||
return [
|
||||
$data = [
|
||||
'success' => false,
|
||||
'errors' => $this->normalizeModelErrors($model->getErrors()),
|
||||
];
|
||||
|
||||
if (ArrayHelper::getValue($data['errors'], 'login') === 'error.account_not_activated') {
|
||||
$data['data']['email'] = $model->getAccount()->email;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
return [
|
||||
|
Reference in New Issue
Block a user