Commit 0ae7f8f71eb955e6b0fe3fb0a210c5a83b76809f
1 parent
e0767b1a
Exists in
master
and in
27 other branches
Fixed logout in RemoteUser plugin
Set current_user = nil when have no REMOTE_USER HTTP header. Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com> Signed-off-by: Thiago Ribeiro <thiagitosouza@hotmail.com>
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,10 +16,7 @@ class RemoteUserPlugin < Noosfero::Plugin | ||
16 | user_data = request.env['HTTP_REMOTE_USER_DATA'] | 16 | user_data = request.env['HTTP_REMOTE_USER_DATA'] |
17 | 17 | ||
18 | if remote_user.blank? | 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 | else | 20 | else |
24 | if user_data.blank? | 21 | if user_data.blank? |
25 | remote_user_email = remote_user + '@remote.user' | 22 | remote_user_email = remote_user + '@remote.user' |