Merge branch 'master' into fix-profile-open
This commit is contained in:
@ -89,14 +89,18 @@ class RecoveryController extends Controller
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
$request = Yii::$app->request;
|
||||
|
||||
/** @var RecoveryForm $form */
|
||||
$form = $this->make(RecoveryForm::class, [], ['scenario' => RecoveryForm::SCENARIO_REQUEST]);
|
||||
|
||||
if(!$request->getIsPost() && !empty($request->get('email'))) {
|
||||
$form->email = $request->get('email');
|
||||
}
|
||||
$event = $this->make(FormEvent::class, [$form]);
|
||||
|
||||
$this->make(AjaxRequestModelValidator::class, [$form])->validate();
|
||||
|
||||
if ($form->load(Yii::$app->request->post()) && $form->validate()) {
|
||||
if ($form->load($request->post()) && $form->validate()) {
|
||||
$this->trigger(FormEvent::EVENT_BEFORE_REQUEST, $event);
|
||||
|
||||
$mailService = MailFactory::makeRecoveryMailerService($form->email);
|
||||
|
||||
@ -226,6 +226,7 @@ class Module extends BaseModule
|
||||
'<action:(register|resend)>' => 'registration/<action>',
|
||||
'confirm/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'registration/confirm',
|
||||
'forgot' => 'recovery/request',
|
||||
'forgot/<email:[a-zA-Z0-9_.±]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+>' => 'recovery/request',
|
||||
'recover/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'recovery/reset'
|
||||
];
|
||||
/**
|
||||
|
||||
@ -93,6 +93,6 @@ class SocialNetworkAccountConnectService implements ServiceInterface
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return $account;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user