* * @package MediaWiki * @subpackage Maintenance * @author Rob Church <*****@*****.**> */ require_once 'commandLine.inc'; require_once 'removeUnusedAccounts.inc'; echo "REMOVE UNUSED ACCOUNTS\nThis script will delete all users who have made no edits.\n\n"; $count = 0; $del = array(); # Right, who needs deleting? $users = GetUsers(); echo "Found " . count($users) . " accounts.\n"; echo "Locating inactive users..."; foreach ($users as $user) { if ($user != 1) { # Don't *touch* the first user account, ever if (CountEdits($user) == 0) { # User has no edits, mark them for deletion $del[] = $user; $count++; } } } echo "done.\n"; # Purge the inactive accounts we found echo $count . " inactive accounts found. Deleting..."; DeleteUsers($del); echo "done.\n"; # We're done echo "Complete.\n";
UpdatePermission(); ShowUserPermissions($UserID, 11); break; case 12: # включить/выключить пользователя BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/users/"); $perm->ExitIfNotAccess(NC_PERM_ITEM_USER, NC_PERM_ACTION_EDIT, $UserID, 0, 1); ChangeCheckedForUser($UserID); unset($UserID); SearchUserResult(); break; case 13: # удалим одного пользователя BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/users/"); $perm->ExitIfNotAccess(NC_PERM_ITEM_USER, NC_PERM_ACTION_DEL, $KillUserID, 0, 1); DeleteUsers($KillUserID); SearchUserResult(); break; case 14: #Подверждение удаления BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/users/"); $perm->ExitIfNotAccess(NC_PERM_ITEM_USER, NC_PERM_ACTION_DEL, $UserID, 0, 0); if (ConfirmDeleteUsers()) { $UI_CONFIG->actionButtons[] = array("id" => "confirm", "caption" => CONTROL_USER_FUNC_CONFIRM_DEL_OK, "action" => "mainView.submitIframeForm()", "red_border" => true); } break; // подписки пользователя // подписки пользователя case 15: BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/users/"); $UI_CONFIG = new ui_config_user();