X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/20e02f42dc5d946f4650c806531b09f793abf503..14b8e7619f284aa2e95ffdea605783384d202822:/app/models/user.rb 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)