Commit 0ae7f8f71eb955e6b0fe3fb0a210c5a83b76809f

Authored by Lucas Kanashiro
1 parent e0767b1a

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 &lt; 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'
... ...