Commit cb6fbc3869cd81d471dfc691521daf2ded515d4c
Exists in
master
and in
21 other branches
Merge branch 'fix_logout_remote_user' into 'master'
Fix log out in RemoteUser plugin Set current_user = nil when have no REMOTE_USER HTTP header. See merge request !501
Showing
1 changed file
with
1 additions
and
4 deletions
Show diff stats
plugins/remote_user/lib/remote_user_plugin.rb
| ... | ... | @@ -16,10 +16,7 @@ class RemoteUserPlugin < Noosfero::Plugin |
| 16 | 16 | user_data = request.env['HTTP_REMOTE_USER_DATA'] |
| 17 | 17 | |
| 18 | 18 | if remote_user.blank? |
| 19 | - if logged_in? | |
| 20 | - self.current_user.forget_me | |
| 21 | - reset_session | |
| 22 | - end | |
| 19 | + self.current_user = nil | |
| 23 | 20 | else |
| 24 | 21 | if user_data.blank? |
| 25 | 22 | remote_user_email = remote_user + '@remote.user' | ... | ... |