‪TYPO3CMS  10.4
TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController Class Reference
Inheritance diagram for TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController:
TYPO3\CMS\FrontendLogin\Controller\AbstractLoginFormController TYPO3\CMS\Extbase\Mvc\Controller\ActionController TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface

Public Member Functions

 __construct (EventDispatcherInterface $eventDispatcher, RecoveryServiceInterface $recoveryService, FrontendUserRepository $userRepository)
 
 recoveryAction (string $userIdentifier=null)
 
 initializeShowChangePasswordAction ()
 
 showChangePasswordAction (string $hash)
 
 initializeChangePasswordAction ()
 
 changePasswordAction (string $newPass, string $hash)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectSignalSlotDispatcher (Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectCacheService (CacheService $cacheService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 initializeControllerArgumentsBaseValidators ()
 
 processRequest (RequestInterface $request, ResponseInterface $response)
 
ControllerContext getControllerContext ()
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
 
bool canProcessRequest (RequestInterface $request)
 
 forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
 throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

 validateIfHashHasExpired ()
 
 validateNewPassword (Result $originalResult)
 
string getTranslation (string $key)
 
bool hasValidHash ($hash)
 
string notifyPasswordChange (string $newPassword, string $hashedPassword, string $hash)
 
bool exposeNoneExistentUser (?string $email)
 
 invalidateUserSessions (int $userId)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 initializeView (ViewInterface $view)
 
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest ($request)
 
string resolveActionMethodName ()
 
 callActionMethod ()
 
 emitBeforeCallActionMethodSignal (array $preparedArguments)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
string errorAction ()
 
 clearCacheOnError ()
 
 addErrorFlashMessage ()
 
string getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
TYPO3 CMS Extbase Mvc Controller ControllerContext buildControllerContext ()
 
 redirect ($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $delay=0, $statusCode=303)
 
 redirectToUri ($uri, $delay=0, $statusCode=303)
 
string addBaseUriIfNecessary ($uri)
 
 mapRequestArgumentsToControllerArguments ()
 

Protected Attributes

RecoveryServiceInterface $recoveryService
 
FrontendUserRepository $userRepository
 
EventDispatcherInterface $eventDispatcher
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
TYPO3 CMS Extbase Service CacheService $cacheService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
TYPO3 CMS Extbase Mvc Request $request
 
TYPO3 CMS Extbase Mvc Response $response
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
 
array $settings
 
TYPO3 CMS Extbase Validation ValidatorResolver $validatorResolver
 
TYPO3 CMS Extbase Mvc Controller Arguments $arguments
 
array $supportedRequestTypes = array( Request::class )
 
TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Detailed Description

this is a concrete TYPO3 implementation and solely used for EXT:felogin and not part of TYPO3's Core API.

Definition at line 42 of file PasswordRecoveryController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::__construct ( EventDispatcherInterface  $eventDispatcher,
RecoveryServiceInterface  $recoveryService,
FrontendUserRepository  $userRepository 
)

Member Function Documentation

◆ changePasswordAction()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::changePasswordAction ( string  $newPass,
string  $hash 
)

Change actual password. Hash $newPass and update the user with the corresponding $hash.

Parameters
string$newPass
string$hash
Exceptions
InvalidPasswordHashException
StopActionException
UnsupportedRequestTypeException
AspectNotFoundException

Definition at line 208 of file PasswordRecoveryController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addFlashMessage(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\getTranslation(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\invalidateUserSessions(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\notifyPasswordChange(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\redirect().

◆ exposeNoneExistentUser()

bool TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::exposeNoneExistentUser ( ?string  $email)
protected
Parameters
string | null$email
Returns
‪bool

Definition at line 321 of file PasswordRecoveryController.php.

Referenced by TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\recoveryAction().

◆ getTranslation()

◆ hasValidHash()

bool TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::hasValidHash (   $hash)
protected

Validates that $hash is in the expected format (timestamp|forgot_hash)

Parameters
string$hash
Returns
‪bool

Definition at line 271 of file PasswordRecoveryController.php.

Referenced by TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateIfHashHasExpired().

◆ initializeChangePasswordAction()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::initializeChangePasswordAction ( )

Validate entered password and passwordRepeat values. If they are invalid a forward() to showChangePasswordAction() takes place. All validation errors are put into the request mapping results.

Used validators are configured via TypoScript settings.

Exceptions
NoSuchArgumentException
StopActionException

Definition at line 159 of file PasswordRecoveryController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\forward(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\getTranslation(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateIfHashHasExpired(), and TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateNewPassword().

◆ initializeShowChangePasswordAction()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::initializeShowChangePasswordAction ( )

Validate hash and make sure it's not expired. If it is not in the correct format or not set at all, a redirect to recoveryAction() is made, without further information.

Exceptions
AspectNotFoundException
StopActionException
UnsupportedRequestTypeException

Definition at line 135 of file PasswordRecoveryController.php.

References TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateIfHashHasExpired().

◆ invalidateUserSessions()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::invalidateUserSessions ( int  $userId)
protected

Invalidate all frontend user sessions by given user id

Definition at line 335 of file PasswordRecoveryController.php.

Referenced by TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\changePasswordAction().

◆ notifyPasswordChange()

string TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::notifyPasswordChange ( string  $newPassword,
string  $hashedPassword,
string  $hash 
)
protected
Parameters
string$newPassword‪Unencrypted new password
string$hashedPassword‪New password hash passed as reference
string$hash‪Forgot password hash
Returns
‪string
Exceptions
StopActionException

Definition at line 283 of file PasswordRecoveryController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\forward().

Referenced by TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\changePasswordAction().

◆ recoveryAction()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::recoveryAction ( string  $userIdentifier = null)

◆ showChangePasswordAction()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::showChangePasswordAction ( string  $hash)

Show the change password form but only if a hash exists (from get parameters).

Parameters
string$hash

Definition at line 145 of file PasswordRecoveryController.php.

◆ validateIfHashHasExpired()

◆ validateNewPassword()

TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::validateNewPassword ( Result  $originalResult)
protected

Member Data Documentation

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::$eventDispatcher
protected

◆ $recoveryService

RecoveryServiceInterface TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::$recoveryService
protected

◆ $userRepository

FrontendUserRepository TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController::$userRepository
protected