summaryrefslogtreecommitdiff
path: root/app/controllers/registrations_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-28 12:00:02 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-28 12:00:02 +0200
commit499154518a1555523ed5f203c9ce4bbe6317c9a5 (patch)
treea353b24c08673cfdc4f0c9cb8617e8c57af822a4 /app/controllers/registrations_controller.rb
parentc843e092f309d22281205e34658221f17642ea33 (diff)
downloadgitlab-ce-499154518a1555523ed5f203c9ce4bbe6317c9a5.tar.gz
You can not remove user if he/she is an only owner of group
To prevent loose of group data you need to transfer or remove group first before you can remove user Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r--app/controllers/registrations_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 830751a989f..6e57fded337 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -6,7 +6,7 @@ class RegistrationsController < Devise::RegistrationsController
end
def destroy
- current_user.destroy
+ DeleteUserService.new.execute(user)
respond_to do |format|
format.html { redirect_to new_user_session_path, notice: "Account successfully removed." }