From caeb660f29d13db62d5381c262aa03e12f201ea2 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 14 Jun 2020 19:50:09 +0200 Subject: Add a way to disable/enable users (#3056) If you want to block users without deleting their account, you can now disable them from the interface. --- p/api/greader.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'p/api/greader.php') diff --git a/p/api/greader.php b/p/api/greader.php index a9e6398d2..b87387bd7 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -157,6 +157,10 @@ function authorizationToUser() { Minz_Log::warning('Invalid API user ' . $user . ': configuration cannot be found.'); unauthorized(); } + if (!FreshRSS_Context::$user_conf->enabled) { + Minz_Log::warning('Invalid API user ' . $user . ': configuration cannot be found.'); + unauthorized(); + } if ($headerAuthX[1] === sha1(FreshRSS_Context::$system_conf->salt . $user . FreshRSS_Context::$user_conf->apiPasswordHash)) { return $user; } else { -- cgit v1.2.3