Skip to content

Commit f7872ee

Browse files
committed
Fixed class usage
1 parent 12883f1 commit f7872ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core-bundle/src/Resources/contao/forms/FormPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function validator($varInput)
142142

143143
/** @var EncoderFactoryInterface $encoderFactory */
144144
$encoderFactory = System::getContainer()->get('security.encoder_factory');
145-
$encoder = $encoderFactory->getEncoder(BackendUser::class);
145+
$encoder = $encoderFactory->getEncoder(FrontendUser::class);
146146

147147
return $encoder->encodePassword($varInput, null);
148148
}

core-bundle/src/Resources/contao/library/Contao/Encryption.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public static function hash($strPassword)
172172
{
173173
/** @var EncoderFactoryInterface $encoderFactory */
174174
$encoderFactory = System::getContainer()->get('security.encoder_factory');
175-
$encoder = $encoderFactory->getEncoder(BackendUser::class); // This is hardcoded (BE and FE users/members should not have a different algo anyway but if you need it, do not rely on a deprecated class but use the services instead)
175+
$encoder = $encoderFactory->getEncoder(User::class);
176176

177177
return $encoder->encodePassword($strPassword, null);
178178
}
@@ -220,7 +220,7 @@ public static function verify($strPassword, $strHash)
220220
{
221221
/** @var EncoderFactoryInterface $encoderFactory */
222222
$encoderFactory = System::getContainer()->get('security.encoder_factory');
223-
$encoder = $encoderFactory->getEncoder(BackendUser::class); // This is hardcoded (BE and FE users/members should not have a different algo anyway but if you need it, do not rely on a deprecated class but use the services instead)
223+
$encoder = $encoderFactory->getEncoder(User::class);
224224

225225
return $encoder->isPasswordValid($strHash, $strPassword, null);
226226
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy