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
This commit is contained in:
Ingo Schommer 2007-09-15 21:43:04 +00:00
parent 6d5eb70625
commit 1119948ec4

View File

@ -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(