WebbuildersGroup\UsernameAuth\Security\LostUsernameHandler
Synopsis
class LostUsernameHandler
extends RequestHandler
{
- // members
- protected string $authenticatorClass = UsernameMemberAuthenticator::class;
- private static array $url_handlers = ;
- private static array $allowed_actions = ;
- protected $link = NULL;
- // methods
- public void __construct()
- public string Link()
- public type lostusername()
- public Form LostUsernameForm()
- public HTTPResponse forgotUsername()
- protected HTTPResponse|null validateForgotUsernameData()
- protected Member|null getMemberFromData()
- protected HTTPResponse redirectToSuccess()
- public string usernamesent()
- protected bool sendEmail()
Hierarchy
Extends
- SilverStripe\Control\RequestHandler
Members
private
- $allowed_actions
—
array
Since the logout and dologin actions may be conditionally removed, it's necessary to ensure these remain valid actions regardless of the member login state. - $url_handlers — array
protected
- $authenticatorClass
—
string
Authentication class to use - $link
—
string
Link to this handler
Methods
protected
- getMemberFromData() — Load an existing Member from the provided data
- redirectToSuccess() — Avoid information disclosure by displaying the same status, regardless wether the email address actually exists
- sendEmail() — Send the email to the member that requested a reset link
- validateForgotUsernameData() — Ensure that the user has provided an email address. Note that the "Email" key is specific to this implementation, but child classes can override this method to use another unique identifier field for validation.
public
- __construct()
- Link() — Return a link to this request handler.
- LostUsernameForm() — Factory method for the forgot username form
- forgotUsername() — Forgot password form handler method.
- lostusername() — show the forgot username page
- usernamesent() — Show the "username sent" page, after a user has requested to send an email with their username