users: delete accounts with invalid names.
Add a fix script to delete all accounts with invalid usernames. Also change it so the owner-level user can delete accounts belonging to other users. Users who have logged in in the last year and who have a valid email address will be given a one week warning. After that all accounts with invalid names will be deleted. Anyone who has visited the site in the last 6 months will have already seen a warning page that their name must be changed to keep using the site.
This commit is contained in:
@@ -9,7 +9,7 @@ module Maintenance
|
||||
end
|
||||
|
||||
def destroy
|
||||
deletion = UserDeletion.new(CurrentUser.user, params.dig(:user, :password), request)
|
||||
deletion = UserDeletion.new(user: CurrentUser.user, deleter: CurrentUser.user, password: params.dig(:user, :password), request: request)
|
||||
deletion.delete!
|
||||
|
||||
if deletion.errors.none?
|
||||
|
||||
Reference in New Issue
Block a user