aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/user_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r--app/controllers/user_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 854c0d989..e2bfa7da9 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -399,6 +399,10 @@ class UserController < ApplicationController
end
def clear_profile_photo
+ if !request.post?
+ raise "Can only clear profile photo from POST request"
+ end
+
# check they are logged in (the upload photo option is anyway only available when logged in)
if authenticated_user.nil?
flash[:error] = "You need to be logged in to clear your profile photo."