| 1 | <?php |
||
| 9 | class EmailAuthenticator extends MemberAuthenticator |
||
|
|
|||
| 10 | { |
||
| 11 | private static $authenticators = array('EmailAuthenticator'); |
||
| 12 | |||
| 13 | private static $default_authenticator = 'EmailAuthenticator'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Method that creates the login form for this authentication method |
||
| 17 | * |
||
| 18 | * @param Controller The parent controller, necessary to create the |
||
| 19 | * appropriate form action tag |
||
| 20 | * @return Form Returns the login form to use with this authentication |
||
| 21 | * method |
||
| 22 | */ |
||
| 23 | public static function get_login_form(Controller $controller) |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * Method to authenticate an user |
||
| 31 | * |
||
| 32 | * @param array $RAW_data Raw data to authenticate the user |
||
| 33 | * @param Form $form Optional: If passed, better error messages can be |
||
| 34 | * produced by using |
||
| 35 | * {@link Form::sessionMessage()} |
||
| 36 | * @return bool|Member Returns FALSE if authentication fails, otherwise |
||
| 37 | * the member object |
||
| 38 | */ |
||
| 39 | public static function authenticate($RAW_data, Form $form = null) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public static function get_default_authenticator() |
||
| 51 | } |
||
| 52 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.