Class: Kiqr::RegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- Kiqr::RegistrationsController
- Defined in:
- app/controllers/kiqr/registrations_controller.rb
Instance Method Summary collapse
-
#delete ⇒ Object
GET /settings/cancel.
-
#destroy ⇒ Object
DELETE /users.
Instance Method Details
#delete ⇒ Object
GET /settings/cancel
8 9 10 11 12 |
# File 'app/controllers/kiqr/registrations_controller.rb', line 8 def delete t("kiqr.breadcrumbs.settings.root"), user_settings_profile_path t("kiqr.breadcrumbs.settings.users.delete_user"), delete_user_registration_path @conflicting_members = current_user.members.where(owner: true) end |
#destroy ⇒ Object
DELETE /users
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/kiqr/registrations_controller.rb', line 15 def destroy # Don't let user cancel their accounts if they are an owner of a team. if current_user.members.find_by(owner: true) (:alert, :cant_cancel_while_team_owner) return redirect_to delete_user_registration_path end # TODO: Don't let user delete account if they have active subscriptions. # TODO: Verify otp before deleting account # TODO: Don't delete account immediately, but mark it as deleted and delete it after 30 days. # TODO: Send email to user with confirmation link to delete account.' super # Inherits from Devise::RegistrationsController end |