authsession : don't display warning if the information is not stored in the previous session
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2086 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -37,6 +37,10 @@ class authsession extends auth
|
||||
/** Return all the parameters recorded for the authenticate user */
|
||||
public function getdetails ()
|
||||
{
|
||||
if (! isset ($_SESSION["domframework"]["auth"]["email"]))
|
||||
return array ("lastname"=>"anonymous",
|
||||
"firstname"=>"",
|
||||
"email"=>"anonymous");
|
||||
return array ("lastname"=>$_SESSION["domframework"]["auth"]["lastname"],
|
||||
"firstname"=>$_SESSION["domframework"]["auth"]["firstname"],
|
||||
"email"=>$_SESSION["domframework"]["auth"]["email"]);
|
||||
@@ -77,9 +81,13 @@ class authsession extends auth
|
||||
/** Remove the informations from the session */
|
||||
public function logout ()
|
||||
{
|
||||
unset ($_SESSION["domframework"]["auth"]["lastname"]);
|
||||
unset ($_SESSION["domframework"]["auth"]["firstname"]);
|
||||
unset ($_SESSION["domframework"]["auth"]["email"]);
|
||||
unset ($_SESSION["domframework"]["auth"]["password"]);
|
||||
if (isset ($_SESSION["domframework"]["auth"]["lastname"]))
|
||||
unset ($_SESSION["domframework"]["auth"]["lastname"]);
|
||||
if (isset ($_SESSION["domframework"]["auth"]["firstname"]))
|
||||
unset ($_SESSION["domframework"]["auth"]["firstname"]);
|
||||
if (isset ($_SESSION["domframework"]["auth"]["email"]))
|
||||
unset ($_SESSION["domframework"]["auth"]["email"]);
|
||||
if (isset ($_SESSION["domframework"]["auth"]["password"]))
|
||||
unset ($_SESSION["domframework"]["auth"]["password"]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user