authparams : remove the spaces before or after the email provided by the user
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1966 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -44,7 +44,8 @@ class authparams
|
|||||||
{
|
{
|
||||||
if (!isset ($_POST["email"]) || !isset ($_POST["password"]))
|
if (!isset ($_POST["email"]) || !isset ($_POST["password"]))
|
||||||
throw new Exception ("No POST provided", 401);
|
throw new Exception ("No POST provided", 401);
|
||||||
return array ("email"=>$_POST["email"], "password"=>$_POST["password"]);
|
return array ("email"=>trim ($_POST["email"]),
|
||||||
|
"password"=>$_POST["password"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get informations from previous recorded session */
|
/** Get informations from previous recorded session */
|
||||||
@@ -73,7 +74,7 @@ class authparams
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return array ("email"=>$_SERVER["PHP_AUTH_USER"],
|
return array ("email"=>trim ($_SERVER["PHP_AUTH_USER"]),
|
||||||
"password"=>$_SERVER["PHP_AUTH_PW"]);
|
"password"=>$_SERVER["PHP_AUTH_PW"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user