Skip to content
Browse files

Merge branch 'master' of git://github.com/technoweenie/restful-authen…

…tication
  • Loading branch information...
2 parents e0a96da + 4834fb7 commit aee09f882a2eefba2bbecc0275c79b02a27a029a @bryan-ash bryan-ash committed Feb 20, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 generators/authenticated/templates/model.rb
View
4 generators/authenticated/templates/model.rb
@@ -55,9 +55,9 @@ def active?
#
def self.authenticate(login, password)
return nil if login.blank? || password.blank?
- u = <% if options[:stateful] %>find_in_state :first, :active, :conditions => {:login => login}<%
+ u = <% if options[:stateful] %>find_in_state :first, :active, :conditions => {:login => login.downcase}<%
elsif options[:include_activation] %>find :first, :conditions => ['login = ? and activated_at IS NOT NULL', login]<%
- else %>find_by_login(login)<% end %> # need to get the salt
+ else %>find_by_login(login.downcase)<% end %> # need to get the salt
u && u.authenticated?(password) ? u : nil
end

0 comments on commit aee09f8

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