‪TYPO3CMS  10.4
TYPO3\CMS\FrontendLogin\Service\RecoveryService Class Reference
Inheritance diagram for TYPO3\CMS\FrontendLogin\Service\RecoveryService:
TYPO3\CMS\FrontendLogin\Service\RecoveryServiceInterface

Public Member Functions

 __construct (Mailer $mailer, EventDispatcherInterface $eventDispatcher, ConfigurationManager $configurationManager, RecoveryConfiguration $recoveryConfiguration, UriBuilder $uriBuilder, FrontendUserRepository $userRepository)
 
 sendRecoveryEmail (string $emailAddress)
 

Protected Member Functions

string getReceiverName (array $userInformation)
 
Email prepareMail (Address $receiver, string $hash)
 
 getEmailSubject ()
 

Protected Attributes

RecoveryConfiguration $recoveryConfiguration
 
EventDispatcherInterface $eventDispatcher
 
Mailer $mailer
 
array $settings
 
UriBuilder $uriBuilder
 
FrontendUserRepository $userRepository
 

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 40 of file RecoveryService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\FrontendLogin\Service\RecoveryService::__construct ( Mailer  $mailer,
EventDispatcherInterface  $eventDispatcher,
ConfigurationManager  $configurationManager,
RecoveryConfiguration  $recoveryConfiguration,
UriBuilder  $uriBuilder,
FrontendUserRepository  $userRepository 
)

Member Function Documentation

◆ getEmailSubject()

TYPO3\CMS\FrontendLogin\Service\RecoveryService::getEmailSubject ( )
protected

◆ getReceiverName()

string TYPO3\CMS\FrontendLogin\Service\RecoveryService::getReceiverName ( array  $userInformation)
protected

Get display name from values. Fallback to username if none of the "_name" fields is set.

Parameters
array$userInformation
Returns
‪string

Definition at line 121 of file RecoveryService.php.

Referenced by TYPO3\CMS\FrontendLogin\Service\RecoveryService\sendRecoveryEmail().

◆ prepareMail()

Email TYPO3\CMS\FrontendLogin\Service\RecoveryService::prepareMail ( Address  $receiver,
string  $hash 
)
protected

Create email object from configuration.

Parameters
Address$receiver
string$hash
Returns
‪Email
Exceptions
IncompleteConfigurationException

Definition at line 144 of file RecoveryService.php.

References $GLOBALS, and TYPO3\CMS\FrontendLogin\Service\RecoveryService\getEmailSubject().

Referenced by TYPO3\CMS\FrontendLogin\Service\RecoveryService\sendRecoveryEmail().

◆ sendRecoveryEmail()

TYPO3\CMS\FrontendLogin\Service\RecoveryService::sendRecoveryEmail ( string  $emailAddress)

Sends an email with an absolute link including a forgot hash to the passed email address with instructions to recover the account.

Parameters
string$emailAddress‪Receiver's email address.
Exceptions
TransportExceptionInterface
IncompleteConfigurationException

Implements TYPO3\CMS\FrontendLogin\Service\RecoveryServiceInterface.

Definition at line 101 of file RecoveryService.php.

References TYPO3\CMS\FrontendLogin\Service\RecoveryService\getReceiverName(), and TYPO3\CMS\FrontendLogin\Service\RecoveryService\prepareMail().

Member Data Documentation

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\FrontendLogin\Service\RecoveryService::$eventDispatcher
protected

◆ $mailer

Mailer TYPO3\CMS\FrontendLogin\Service\RecoveryService::$mailer
protected

◆ $recoveryConfiguration

RecoveryConfiguration TYPO3\CMS\FrontendLogin\Service\RecoveryService::$recoveryConfiguration
protected

◆ $settings

array TYPO3\CMS\FrontendLogin\Service\RecoveryService::$settings
protected

Definition at line 56 of file RecoveryService.php.

◆ $uriBuilder

UriBuilder TYPO3\CMS\FrontendLogin\Service\RecoveryService::$uriBuilder
protected

◆ $userRepository

FrontendUserRepository TYPO3\CMS\FrontendLogin\Service\RecoveryService::$userRepository
protected