mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Ensure currentUserID() returns an int
Cast $id returned from Session as an int to ensure it's never returned as a string
This commit is contained in:
parent
bb37bc5491
commit
f214cd52e0
@ -894,7 +894,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
$id = Session::get("loggedInAs");
|
||||
}
|
||||
|
||||
return is_numeric($id) ? $id : 0;
|
||||
return is_numeric($id) ? (int) $id : 0;
|
||||
}
|
||||
private static $_already_tried_to_auto_log_in = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user