summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/accounts_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/accounts_controller.rb')
-rw-r--r--app/controllers/profiles/accounts_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/profiles/accounts_controller.rb b/app/controllers/profiles/accounts_controller.rb
index fe121691a10..9bd34fe2261 100644
--- a/app/controllers/profiles/accounts_controller.rb
+++ b/app/controllers/profiles/accounts_controller.rb
@@ -4,4 +4,10 @@ class Profiles::AccountsController < ApplicationController
def show
@user = current_user
end
+
+ def unlink
+ provider = params[:provider]
+ current_user.identities.find_by(provider: provider).destroy
+ redirect_to profile_account_path
+ end
end