Skip to content
Browse files

once cookie login, set session login and reset cookie

  • Loading branch information...
1 parent 03fc520 commit f726db41b7c770829f9aa1a679ba390a6b314161 @mooktakim committed Dec 9, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/extensions/action_controller/base.rb
View
4 lib/extensions/action_controller/base.rb
@@ -48,7 +48,9 @@ def session_login
end
def cookie_login
- User.find_with_remember_token(cookies.signed[:remember_token])
+ u = User.find_with_remember_token(cookies.signed[:remember_token])
+ current_user = u if u
+ u
end
def current_user?

0 comments on commit f726db4

Please sign in to comment.
Something went wrong with that request. Please try again.