Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-14 22:02:53 +01:00
17 Zeilen
421 B
Ruby
17 Zeilen
421 B
Ruby
# frozen_string_literal: true
|
|
class CustomWizard::UserController < ::Admin::AdminController
|
|
before_action :ensure_admin
|
|
requires_plugin "discourse-custom-wizard"
|
|
|
|
def clear_redirect
|
|
user = User.find_by(id: params[:id])
|
|
|
|
if user
|
|
user.custom_fields["redirect_to_wizard"] = nil
|
|
user.save_custom_fields(true)
|
|
render json: success_json
|
|
else
|
|
render json: failed_json
|
|
end
|
|
end
|
|
end
|