Permalink
Browse files

omnisocial update

  • Loading branch information...
1 parent c4d9dc2 commit 584684c5887fa3d1713389c81c76b49ac1d2b589 @mooktakim committed Nov 8, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/extensions/action_controller/base.rb
View
8 lib/extensions/action_controller/base.rb
@@ -32,12 +32,12 @@ def redirect_back_or_default(default)
def current_user
@current_user ||= if session[:user_id]
- User.find(session[:user_id]) rescue nil
+ User.find(session[:user_id])
elsif cookies[:remember_token]
- User.find_by_remember_token(cookies[:remember_token]) rescue nil
- else
- nil
+ User.find_by_remember_token(cookies[:remember_token])
end
+ rescue
+ logout!
end
def current_user?

0 comments on commit 584684c

Please sign in to comment.