summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index ea56ebf..ae9424e 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -147,11 +147,11 @@ class UsersController < ApplicationController
end
if userdata[:role]
role = Role.get(userdata[:role])
- if role <= current_user.role
+ if role && role <= current_user.role
userdata[:role] = role
else
# don't change role
- userdata.delete[:role]
+ userdata.delete(:role)
end
end
if @user.youtube != userdata[:youtube]