Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/technoweenie/restful-authen…
Browse files Browse the repository at this point in the history
…tication
  • Loading branch information
bryan-ash committed Feb 20, 2009
2 parents e0a96da + 4834fb7 commit aee09f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generators/authenticated/templates/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit aee09f8

Please sign in to comment.