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.
This commit is contained in:
Alexis Degrugillier
2020-06-14 19:50:09 +02:00
committed by GitHub
parent 6edbeaaf6a
commit caeb660f29
28 changed files with 94 additions and 19 deletions

View File

@@ -53,6 +53,10 @@ if ($system_conf->default_user !== '') {
$limits = $system_conf->limits;
$min_last_activity = time() - $limits['max_inactivity'];
foreach ($users as $user) {
if (!get_user_configuration($user)->enabled) {
notice('FreshRSS skip disabled user ' . $user);
continue;
}
if (($user !== $system_conf->default_user) &&
(FreshRSS_UserDAO::mtime($user) < $min_last_activity)) {
notice('FreshRSS skip inactive user ' . $user);