X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/20e02f42dc5d946f4650c806531b09f793abf503..89e976c6e57c9aa8afae00437aaf4399ea5fc58f:/app/models/user.rb?ds=sidebyside diff --git a/app/models/user.rb b/app/models/user.rb index f72fd5bfa..c64fcf21b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -28,8 +28,8 @@ class User < ActiveRecord::Base write_attribute("pass_crypt_confirm", Digest::MD5.hexdigest(str)) end - def self.authenticate(email, passwd) - find(:first, :conditions => [ "email = ? AND pass_crypt = ?", email, Digest::MD5.hexdigest(passwd)]) + def self.authenticate(email, passwd) + find(:first, :conditions => [ "email = ? AND pass_crypt = ? AND active = true", email, Digest::MD5.hexdigest(passwd)]) end def self.authenticate_token(token)