users.getXbyEmail - lowercase before searching

v1.18.x
psychobunny 11 years ago
parent 3b55e65714
commit 8443ae58ff

@ -381,11 +381,11 @@ var bcrypt = require('bcryptjs'),
};
User.getUidByEmail = function(email, callback) {
db.getObjectField('email:uid', email, callback);
db.getObjectField('email:uid', email.toLowerCase(), callback);
};
User.getUsernameByEmail = function(email, callback) {
db.getObjectField('email:uid', email, function(err, uid) {
db.getObjectField('email:uid', email.toLowerCase(), function(err, uid) {
if (err) {
return callback(err);
}

Loading…
Cancel
Save