mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Remvoed unused method Security::authenticate()
This commit is contained in:
parent
5ab38ae13b
commit
ce6d24c379
@ -618,34 +618,6 @@ class Security extends Controller {
|
|||||||
return new ChangePasswordForm($this, 'ChangePasswordForm');
|
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.
|
* Return an existing member with administrator privileges, or create one of necessary.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user