mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 22:59:52 +02:00
Removed deprecated SessionInterface service
This commit is contained in:
parent
1cee1abe00
commit
b3ecee749e
4 changed files with 21 additions and 17 deletions
|
@ -56,14 +56,11 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface
|
|||
*/
|
||||
public const REDIRECT_TARGET = 'user_settings';
|
||||
private Security $security;
|
||||
private FlashBagInterface $flashBag;
|
||||
private HttpUtils $httpUtils;
|
||||
|
||||
public function __construct(Security $security, SessionInterface $session, HttpUtils $httpUtils)
|
||||
public function __construct(Security $security, HttpUtils $httpUtils)
|
||||
{
|
||||
/** @var Session $session */
|
||||
$this->security = $security;
|
||||
$this->flashBag = $session->getFlashBag();
|
||||
$this->httpUtils = $httpUtils;
|
||||
}
|
||||
|
||||
|
@ -103,9 +100,13 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface
|
|||
return;
|
||||
}
|
||||
|
||||
/** @var Session $session */
|
||||
$session = $request->getSession();
|
||||
$flashBag = $session->getFlashBag();
|
||||
|
||||
//Show appropriate message to user about the reason he was redirected
|
||||
if ($user->isNeedPwChange()) {
|
||||
$this->flashBag->add('warning', 'user.pw_change_needed.flash');
|
||||
$flashBag->add('warning', 'user.pw_change_needed.flash');
|
||||
}
|
||||
|
||||
if (static::TFARedirectNeeded($user)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue