mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: check that we have a token and a UID before attempting a member auto login
This commit is contained in:
parent
be7e0db26e
commit
b1df9dcb1d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user