From c3a8bf9c22ef4a8307aaf0c8a5cd1a46a4a81010 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 9 Dec 2019 14:22:20 +0000 Subject: [PATCH] authjwt : if the JWT is unknown, do not generate a warning , and return anonymous git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5822 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- authjwt.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authjwt.php b/authjwt.php index b9a851a..cbcbd1a 100644 --- a/authjwt.php +++ b/authjwt.php @@ -93,7 +93,8 @@ class authjwt extends auth public function getdetails () // {{{ { - if (key_exists ("email", $this->payload) && + if (! is_array ($this->payload) || + key_exists ("email", $this->payload) && $this->payload["email"] === "anonymous") return array ("lastname" => "anonymous", "firstname" => "",