allow bypassing auth tokens in unit tests
This commit is contained in:
parent
b0cb46abca
commit
0b2e36303d
1 changed files with 3 additions and 1 deletions
|
@ -247,7 +247,9 @@ class User
|
||||||
|
|
||||||
public function check_auth_token(): bool
|
public function check_auth_token(): bool
|
||||||
{
|
{
|
||||||
if(defined("UNITTEST")) return true;
|
if (defined("UNITTEST")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return (isset($_POST["auth_token"]) && $_POST["auth_token"] == $this->get_auth_token());
|
return (isset($_POST["auth_token"]) && $_POST["auth_token"] == $this->get_auth_token());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue