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:
Steve Boyd 2018-01-23 13:37:06 +13:00 committed by GitHub
parent bb37bc5491
commit f214cd52e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -894,7 +894,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
$id = Session::get("loggedInAs"); $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; private static $_already_tried_to_auto_log_in = false;