Permalink
Browse files

Add a nil check to login with api key

  • Loading branch information...
1 parent 2a40855 commit 690c650bd21c16342639e931739d28185c7c135a @skalnik skalnik committed Jun 30, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/authenticated_system.rb
@@ -117,6 +117,6 @@ def login_from_cookie
end
def login_from_api_key
- self.current_user = User.find_by_api_key(params[:api_key]) unless params[:api_key].empty?
+ self.current_user = User.find_by_api_key(params[:api_key]) unless params.nil? and params[:api_key].empty?
end
end

0 comments on commit 690c650

Please sign in to comment.