From ce6d24c379ab3319b74af4f734a514a72d5811b6 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 10 Jan 2012 10:43:54 +1300 Subject: [PATCH] BUGFIX: Remvoed unused method Security::authenticate() --- security/Security.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/security/Security.php b/security/Security.php index dbcf72a04..74acb4982 100644 --- a/security/Security.php +++ b/security/Security.php @@ -618,34 +618,6 @@ class Security extends Controller { return new ChangePasswordForm($this, 'ChangePasswordForm'); } - - /** - * Authenticate using the given email and password, returning the - * appropriate member object if - * - * @return bool|Member Returns FALSE if authentication fails, otherwise - * the member object - * @see setDefaultAdmin() - */ - public static function authenticate($RAW_email, $RAW_password) { - $SQL_email = Convert::raw2sql($RAW_email); - $SQL_password = Convert::raw2sql($RAW_password); - - // Default login (see {@setDetaultAdmin()}) - if(($RAW_email == self::$default_username) && ($RAW_password == self::$default_password) - && !empty(self::$default_username) && !empty(self::$default_password)) { - $member = self::findAnAdministrator(); - } else { - $member = DataObject::get_one("Member", "\"" . Member::get_unique_identifier_field() . "\" = '$SQL_email' AND \"Password\" IS NOT NULL"); - if($member && ($member->checkPassword($RAW_password) == false)) { - $member = null; - } - } - - return $member; - } - - /** * Return an existing member with administrator privileges, or create one of necessary. *