Permalink
Browse files

用户名不区分大小写

  • Loading branch information...
1 parent cbebbda commit 9b9bfe7deb337569118e81ff74307612ed3aca9d @alsotang alsotang committed Apr 20, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 proxy/user.js
View
@@ -27,7 +27,7 @@ exports.getUsersByNames = function (names, callback) {
* @param {Function} callback 回调函数
*/
exports.getUserByLoginName = function (loginName, callback) {
- User.findOne({'loginname': loginName}, callback);
+ User.findOne({'loginname': new RegExp('^'+loginName+'$', "i")}, callback);
};
/**

0 comments on commit 9b9bfe7

Please sign in to comment.