diff --git a/lib/models/user.js b/lib/models/user.js index 61a67313..7a062da7 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -144,24 +144,24 @@ User.login = function (credentials, fn) { var defaultError = new Error('login failed'); if(err) { - debug('User: error reported from User.findOne: %j', err); + debug('An error is reported from User.findOne: %j', err); fn(defaultError); } else if(user) { user.hasPassword(credentials.password, function(err, isMatch) { if(err) { - debug('User: error reported from User.hasPassword: %j', err); + debug('An error is reported from User.hasPassword: %j', err); fn(defaultError); } else if(isMatch) { user.accessTokens.create({ ttl: Math.min(credentials.ttl || User.settings.ttl, User.settings.maxTTL) }, fn); } else { - debug('User: invalid password for user %s', query.email || query.username); + debug('The password is invalid for user %s', query.email || query.username); fn(defaultError); } }); } else { - debug('User: no matching record found for user %s', query.email || query.username); + debug('No matching record is found for user %s', query.email || query.username); fn(defaultError); } });