Exception -> \Exception
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4657 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -12,7 +12,7 @@ class authsession extends auth
|
||||
function __construct ()
|
||||
{
|
||||
if (!isset ($_SESSION))
|
||||
throw new Exception ("No session previously opened", 401);
|
||||
throw new \Exception ("No session previously opened", 401);
|
||||
}
|
||||
|
||||
/** No connection to session */
|
||||
@@ -29,11 +29,11 @@ class authsession extends auth
|
||||
{
|
||||
if (!isset ($_SESSION["domframework"]["auth"]["email"]) ||
|
||||
!isset ($_SESSION["domframework"]["auth"]["password"]))
|
||||
throw new Exception ("No previous email in session", 401);
|
||||
throw new \Exception ("No previous email in session", 401);
|
||||
if ($_SESSION["domframework"]["auth"]["email"] !== $email)
|
||||
throw new Exception ("Unable to authenticate user '$email'", 401);
|
||||
throw new \Exception ("Unable to authenticate user '$email'", 401);
|
||||
if ($_SESSION["domframework"]["auth"]["password"] !== $password)
|
||||
throw new Exception ("Bad password for '$email'", 401);
|
||||
throw new \Exception ("Bad password for '$email'", 401);
|
||||
}
|
||||
|
||||
/** Return all the parameters recorded for the authenticate user */
|
||||
@@ -55,7 +55,7 @@ class authsession extends auth
|
||||
*/
|
||||
public function changepassword ($oldpassword, $newpassword)
|
||||
{
|
||||
throw new Exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext("domframework",
|
||||
"The password can't be change for SESSION users"),
|
||||
405);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class authsession extends auth
|
||||
*/
|
||||
public function overwritepassword ($email, $newpassword)
|
||||
{
|
||||
throw new exception (dgettext("domframework",
|
||||
throw new \Exception (dgettext("domframework",
|
||||
"The password can't be overwrite for SESSION users"),
|
||||
405);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user