From 1d12c76093e9b0d279aab22240edc5927c48e94a Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sun, 26 Sep 2021 10:08:29 +0200 Subject: [PATCH] Type login id return --- galette/lib/Galette/Core/Authentication.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/galette/lib/Galette/Core/Authentication.php b/galette/lib/Galette/Core/Authentication.php index 5b518aa02..eb935d795 100644 --- a/galette/lib/Galette/Core/Authentication.php +++ b/galette/lib/Galette/Core/Authentication.php @@ -295,7 +295,12 @@ abstract class Authentication { $forbidden = array('logged', 'admin', 'active', 'superadmin', 'staff', 'cron', 'uptodate'); if (isset($this->$name) && !in_array($name, $forbidden)) { - return $this->$name; + switch ($name) { + case 'id': + return (int)$this->$name; + default: + return $this->$name; + } } else { return false; } -- 2.39.2