BUGFIX error in RestfulServer: currentMember should be currentUser (fixes #6283)

http://open.silverstripe.org/ticket/6283
This commit is contained in:
nicolaas 2011-03-18 22:17:57 +00:00 committed by Ingo Schommer
parent 6a268a8b37
commit 7b56008414

View File

@ -579,7 +579,7 @@ class RestfulServer extends Controller {
protected function authenticate() { protected function authenticate() {
if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) return false; if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) return false;
if($member = Member::currentMember()) return $member; if($member = Member::currentUser()) return $member;
$member = MemberAuthenticator::authenticate(array( $member = MemberAuthenticator::authenticate(array(
'Email' => $_SERVER['PHP_AUTH_USER'], 'Email' => $_SERVER['PHP_AUTH_USER'],
'Password' => $_SERVER['PHP_AUTH_PW'], 'Password' => $_SERVER['PHP_AUTH_PW'],