Modified: trunk/app/models/user.rb (2193 => 2194)
--- trunk/app/models/user.rb 2009-05-12 15:15:32 UTC (rev 2193)
+++ trunk/app/models/user.rb 2009-05-12 17:06:15 UTC (rev 2194)
@@ -207,14 +207,12 @@
def self.authenticate(login, password)
return nil if login.blank? or password.blank?
- eager_include = [ :contributions, :tags ]
-
# Either, check for a User with username matching 'login'
- u = find(:first, :conditions => ["username = ?", login], :include => eager_include)
+ u = find(:first, :conditions => ["username = ?", login])
# Or, check for a User with email address matching 'login'
unless u
- u = find(:first, :conditions => ["email = ?", login], :include => eager_include)
+ u = find(:first, :conditions => ["email = ?", login])
end
u && u.activated? && u.authenticated?(password) ? u : nil