activerain-clearance 0.6.6001 → 0.6.6002
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/clearance/user.rb +1 -1
- metadata +1 -1
data/lib/clearance/user.rb
CHANGED
@@ -134,7 +134,7 @@ module Clearance
|
|
134
134
|
|
135
135
|
module ClassMethods
|
136
136
|
def authenticate(email, password)
|
137
|
-
return nil unless user = find_by_email(email)
|
137
|
+
return nil unless user = find_by_email(email) || find_by_username(email)
|
138
138
|
return user if user.authenticated?(password)
|
139
139
|
end
|
140
140
|
end
|