authparams : in CLI, return the user "cli"
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1833 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -13,6 +13,13 @@ class authparams
|
|||||||
of the user.
|
of the user.
|
||||||
If non is found, return "anonymous", "anonymous" */
|
If non is found, return "anonymous", "anonymous" */
|
||||||
public function __construct ($authprocesses=array("session","post"))
|
public function __construct ($authprocesses=array("session","post"))
|
||||||
|
{
|
||||||
|
if (php_sapi_name () === "cli")
|
||||||
|
{
|
||||||
|
$this->email = "cli";
|
||||||
|
$this->password = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
foreach ($authprocesses as $authprocess)
|
foreach ($authprocesses as $authprocess)
|
||||||
{
|
{
|
||||||
@@ -30,6 +37,7 @@ class authparams
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Get informations from $POST variables */
|
/** Get informations from $POST variables */
|
||||||
public function post()
|
public function post()
|
||||||
|
|||||||
Reference in New Issue
Block a user