ilateral\SilverStripe\AuthUsername\Security\UsernameOrEmailAuthenticator
Overwrite MemberAuthenticator and add support for a usernajme as well as an email address for authentication
Synopsis
class UsernameOrEmailAuthenticator
extends MemberAuthenticator
{
- // constants
- const IDENTITY = "Identity";
- // methods
- protected Member authenticateMember()
- protected void recordLoginAttempt()
- public LoginHandler getLoginHandler()
- public static string get_name()
Hierarchy
Extends
- SilverStripe\Security\MemberAuthenticator\MemberAuthenticator
Constants
Name | Value |
---|---|
IDENTITY | "Identity" |
Methods
protected
- authenticateMember() — Overwrite standard authentication in order to also look for user ID (as well as email)
- recordLoginAttempt() — Log login attempt, again largly copied from MemberAuthenticator
public
- getLoginHandler()
- get_name() — Give a title to the Authenticator tab (when multiple Authenticators are registered)