diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-06-14 17:11:37 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-06-14 17:11:37 +0200 |
commit | 9d24536dd8ad865dfad2c0259d6b00273e826c12 (patch) | |
tree | 10c865da925f4ace28d26f44a4c7d66f3a6fc19e /lib/plugins/authplain | |
parent | e0086ca277bafe4f068079a4655a5601914a6f03 (diff) | |
download | rpg-9d24536dd8ad865dfad2c0259d6b00273e826c12.tar.gz rpg-9d24536dd8ad865dfad2c0259d6b00273e826c12.tar.bz2 |
correctly count deleted users in plain auth FS#2800
reloading the user list after the delete action will make sure the count
is always correct.
Diffstat (limited to 'lib/plugins/authplain')
-rw-r--r-- | lib/plugins/authplain/auth.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index 3416ede89..8c4ce0dd9 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -198,13 +198,9 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { if(empty($deleted)) return 0; $pattern = '/^('.join('|', $deleted).'):/'; + io_deleteFromFile($config_cascade['plainauth.users']['default'], $pattern, true); - if(io_deleteFromFile($config_cascade['plainauth.users']['default'], $pattern, true)) { - foreach($deleted as $user) unset($this->users[$user]); - return count($deleted); - } - - // problem deleting, reload the user list and count the difference + // reload the user list and count the difference $count = count($this->users); $this->_loadUserData(); $count -= count($this->users); |