Merge branch 'master' into fix-profile-open

This commit is contained in:
Lorenzo Milesi
2024-09-18 21:53:32 +02:00
committed by GitHub
5 changed files with 11 additions and 4 deletions

View File

@ -76,7 +76,7 @@ jobs:
run: vendor/bin/phpstan analyse run: vendor/bin/phpstan analyse
- name: Archive failed tests artifacts - test output & log - name: Archive failed tests artifacts - test output & log
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: test-outputs-php-${{ matrix.php-versions }} name: test-outputs-php-${{ matrix.php-versions }}

View File

@ -6,6 +6,8 @@
- New #553: created Da\User\AuthClient\Microsoft365 auth client (edegaudenzi) - New #553: created Da\User\AuthClient\Microsoft365 auth client (edegaudenzi)
- Ehh: Added SecurityHelper to the Bootstrap classMap - Ehh: Added SecurityHelper to the Bootstrap classMap
- Fix #546: The profile/show page must not be visible by default, implement configurable policy (TonisOrmisson) - Fix #546: The profile/show page must not be visible by default, implement configurable policy (TonisOrmisson)
- Fix #397: No more fatal Exceptions when connecting to already taken Social Network (edegaudenzi)
- Ehh: Added option to pre-fill recovery email via url parameter (TonisOrmisson)
## 1.6.3 Mar 18th, 2024 ## 1.6.3 Mar 18th, 2024

View File

@ -89,14 +89,18 @@ class RecoveryController extends Controller
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
$request = Yii::$app->request;
/** @var RecoveryForm $form */ /** @var RecoveryForm $form */
$form = $this->make(RecoveryForm::class, [], ['scenario' => RecoveryForm::SCENARIO_REQUEST]); $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]); $event = $this->make(FormEvent::class, [$form]);
$this->make(AjaxRequestModelValidator::class, [$form])->validate(); $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); $this->trigger(FormEvent::EVENT_BEFORE_REQUEST, $event);
$mailService = MailFactory::makeRecoveryMailerService($form->email); $mailService = MailFactory::makeRecoveryMailerService($form->email);

View File

@ -226,6 +226,7 @@ class Module extends BaseModule
'<action:(register|resend)>' => 'registration/<action>', '<action:(register|resend)>' => 'registration/<action>',
'confirm/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'registration/confirm', 'confirm/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'registration/confirm',
'forgot' => 'recovery/request', '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' 'recover/<id:\d+>/<code:[A-Za-z0-9_-]+>' => 'recovery/reset'
]; ];
/** /**

View File

@ -93,6 +93,6 @@ class SocialNetworkAccountConnectService implements ServiceInterface
} }
} }
return false; return $account;
} }
} }