Skip to content
Snippets Groups Projects
Commit 9d24536d authored by Andreas Gohr's avatar Andreas Gohr
Browse files

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.
parent e0086ca2
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment