X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e5a5f957ef46d76ec78e2c0450b50a086dff82b6..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)