allow bypassing auth tokens in unit tests

This commit is contained in:
Shish 2020-04-25 21:35:14 +01:00
parent b0cb46abca
commit 0b2e36303d

View file

@ -247,7 +247,9 @@ class User
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());
}