Authentication for test wasn't working. (merged from branches/2.2.0@45907, r45823)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46114 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-12-02 21:35:30 +00:00
parent 8f712a3392
commit 425714a281

View File

@ -491,8 +491,10 @@ class Security extends Controller {
&& !empty(self::$default_username) && !empty(self::$default_password)) { && !empty(self::$default_username) && !empty(self::$default_password)) {
$member = self::findAnAdministrator(); $member = self::findAnAdministrator();
} else { } else {
$member = DataObject::get_one("Member", $member = DataObject::get_one("Member", "Email = '$SQL_email' AND Password IS NOT NULL");
"Email = '$SQL_email' And Password = '$SQL_password'"); if($member && ($member->checkPassword($RAW_password) == false)) {
$member = null;
}
} }
return $member; return $member;