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 ()
|
function __construct ()
|
||||||
{
|
{
|
||||||
if (!isset ($_SESSION))
|
if (!isset ($_SESSION))
|
||||||
throw new Exception ("No session previously opened", 401);
|
throw new \Exception ("No session previously opened", 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** No connection to session */
|
/** No connection to session */
|
||||||
@@ -29,11 +29,11 @@ class authsession extends auth
|
|||||||
{
|
{
|
||||||
if (!isset ($_SESSION["domframework"]["auth"]["email"]) ||
|
if (!isset ($_SESSION["domframework"]["auth"]["email"]) ||
|
||||||
!isset ($_SESSION["domframework"]["auth"]["password"]))
|
!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)
|
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)
|
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 */
|
/** Return all the parameters recorded for the authenticate user */
|
||||||
@@ -55,7 +55,7 @@ class authsession extends auth
|
|||||||
*/
|
*/
|
||||||
public function changepassword ($oldpassword, $newpassword)
|
public function changepassword ($oldpassword, $newpassword)
|
||||||
{
|
{
|
||||||
throw new Exception (dgettext("domframework",
|
throw new \Exception (dgettext("domframework",
|
||||||
"The password can't be change for SESSION users"),
|
"The password can't be change for SESSION users"),
|
||||||
405);
|
405);
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ class authsession extends auth
|
|||||||
*/
|
*/
|
||||||
public function overwritepassword ($email, $newpassword)
|
public function overwritepassword ($email, $newpassword)
|
||||||
{
|
{
|
||||||
throw new exception (dgettext("domframework",
|
throw new \Exception (dgettext("domframework",
|
||||||
"The password can't be overwrite for SESSION users"),
|
"The password can't be overwrite for SESSION users"),
|
||||||
405);
|
405);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class ratelimit
|
|||||||
*/
|
*/
|
||||||
public function set ($name)
|
public function set ($name)
|
||||||
{
|
{
|
||||||
throw new Exception (dgettext("domframework",
|
throw new \Exception (dgettext("domframework",
|
||||||
"ratelimit : no valid ratelimiter available"),
|
"ratelimit : no valid ratelimiter available"),
|
||||||
500);
|
500);
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ class ratelimit
|
|||||||
*/
|
*/
|
||||||
public function del ($name)
|
public function del ($name)
|
||||||
{
|
{
|
||||||
throw new Exception (dgettext("domframework",
|
throw new \Exception (dgettext("domframework",
|
||||||
"ratelimit : no valid ratelimiter available"),
|
"ratelimit : no valid ratelimiter available"),
|
||||||
500);
|
500);
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ class ratelimit
|
|||||||
*/
|
*/
|
||||||
public function clean ()
|
public function clean ()
|
||||||
{
|
{
|
||||||
throw new Exception (dgettext("domframework",
|
throw new \Exception (dgettext("domframework",
|
||||||
"ratelimit : no valid ratelimiter available"),
|
"ratelimit : no valid ratelimiter available"),
|
||||||
500);
|
500);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user