From 0b2e36303da1d89934055e708de92fb7def54093 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 25 Apr 2020 21:35:14 +0100 Subject: [PATCH] allow bypassing auth tokens in unit tests --- core/user.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/user.php b/core/user.php index dda8c5a3..1496c208 100644 --- a/core/user.php +++ b/core/user.php @@ -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()); }