From 821fc9ed841e015610da55e90b24bb050aefb868 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 12 Sep 2016 09:44:44 +0000 Subject: [PATCH] authentication : if there is no lastname/firstname provided, don't generate a warning git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3035 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- authentication.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authentication.php b/authentication.php index c451038..e3a8cd4 100644 --- a/authentication.php +++ b/authentication.php @@ -163,6 +163,10 @@ class authentication call_user_func ($this->loggingFunc, LOG_NOTICE, "Logging in for '$authparams->email'"); + if (! array_key_exists ("lastname", $res)) + $res["lastname"] = null; + if (! array_key_exists ("firstname", $res)) + $res["firstname"] = null; $session = new \authsession (); $session-> savedata ($authparams->email, $authparams->password, $res["lastname"], $res["firstname"]);