BUGFIX: check that we have a token and a UID before attempting a member auto login

This commit is contained in:
Stevie Mayhew 2016-05-20 09:19:08 +12:00
parent be7e0db26e
commit b1df9dcb1d

View File

@ -582,6 +582,10 @@ class Member extends DataObject implements TemplateGlobalProvider {
list($uid, $token) = explode(':', Cookie::get('alc_enc'), 2); list($uid, $token) = explode(':', Cookie::get('alc_enc'), 2);
if (!$uid || !$token) {
return;
}
$member = DataObject::get_by_id("Member", $uid); $member = DataObject::get_by_id("Member", $uid);
// check if autologin token matches // check if autologin token matches