<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -55,9 +55,9 @@ class &lt;%= class_name %&gt; &lt; ActiveRecord::Base
   #
   def self.authenticate(login, password)
     return nil if login.blank? || password.blank?
-    u = &lt;% if    options[:stateful]           %&gt;find_in_state :first, :active, :conditions =&gt; {:login =&gt; login}&lt;%
+    u = &lt;% if    options[:stateful]           %&gt;find_in_state :first, :active, :conditions =&gt; {:login =&gt; login.downcase}&lt;%
            elsif options[:include_activation] %&gt;find :first, :conditions =&gt; ['login = ? and activated_at IS NOT NULL', login]&lt;%
-           else %&gt;find_by_login(login)&lt;% end %&gt; # need to get the salt
+           else %&gt;find_by_login(login.downcase)&lt;% end %&gt; # need to get the salt
     u &amp;&amp; u.authenticated?(password) ? u : nil
   end
 </diff>
      <filename>generators/authenticated/templates/model.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>61cd9b377c0b481384f123dc628a2f8cc5ea5fdf</id>
    </parent>
  </parents>
  <author>
    <name>jicksta</name>
    <email>Jicksta@Gmail.com</email>
  </author>
  <url>http://github.com/technoweenie/restful-authentication/commit/4834fb74028d3c40991b622de30b1f550fec512d</url>
  <id>4834fb74028d3c40991b622de30b1f550fec512d</id>
  <committed-date>2009-02-17T16:32:55-08:00</committed-date>
  <authored-date>2009-02-17T16:32:55-08:00</authored-date>
  <message>downcase() the username when using a generated model's authenticate() class method. (usernames are stored downcase()d)</message>
  <tree>c6d43bd27dc3e6c380d226d06a4b031653ec9041</tree>
  <committer>
    <name>jicksta</name>
    <email>Jicksta@Gmail.com</email>
  </committer>
</commit>
