Skip to content

Commit

Permalink
Fixing a current_user bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielweinmann committed Feb 13, 2012
1 parent 97d7ff1 commit f4c9135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def current_user
if cookies[:remember_me_id] and cookies[:remember_me_hash]
@current_user = User.find(cookies[:remember_me_id])
@current_user = nil unless @current_user.remember_me_hash == cookies[:remember_me_hash]
session[:user_id] = @current_user.id
return session[:user_id] = @current_user.id
end
return @current_user = request.env['warden'].authenticate(:user) rescue nil
rescue Exception => e
Expand Down

0 comments on commit f4c9135

Please sign in to comment.