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
This commit is contained in:
2019-12-09 14:22:20 +00:00
parent 6b64eb453e
commit c3a8bf9c22

View File

@@ -93,7 +93,8 @@ class authjwt extends auth
public function getdetails () public function getdetails ()
// {{{ // {{{
{ {
if (key_exists ("email", $this->payload) && if (! is_array ($this->payload) ||
key_exists ("email", $this->payload) &&
$this->payload["email"] === "anonymous") $this->payload["email"] === "anonymous")
return array ("lastname" => "anonymous", return array ("lastname" => "anonymous",
"firstname" => "", "firstname" => "",