From 1119948ec432e4a4a1787775e3f6035a67e30e2e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 15 Sep 2007 21:43:04 +0000 Subject: [PATCH] mlanthaler: Reverted changes from r38216 which was an invalid fix. Also adjusted the method so that now cookies are accessed exclusively over the Cookie class. (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41958 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Member.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/Member.php b/security/Member.php index e5ced4360..4103d67a7 100644 --- a/security/Member.php +++ b/security/Member.php @@ -64,9 +64,9 @@ class Member extends DataObject { * auto-login. */ static function autoLogin() { - if(isset($_COOKIE['alc_enc']) && !Session::get("loggedInAs")) { + if(strpos(Cookie::get('alc_enc'), ':') && !Session::get("loggedInAs")) { - @list($uid, $token) = explode(':', urldecode($_COOKIE['alc_enc']), 2); + list($uid, $token) = explode(':', Cookie::get('alc_enc'), 2); $SQL_uid = Convert::raw2sql($uid); $member = DataObject::get_one(