修改BUG:新用户检查时用户名是否可用时,要检查已经申请但还没有同意的用户名

This commit is contained in:
Argo-Lenovo 2017-04-13 14:01:20 +08:00
parent 21a144d697
commit 8a93e4ed9b
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ namespace Bootstrap.Admin.Controllers
if (value.UserStatus == 9) if (value.UserStatus == 9)
{ {
// vlaidate userName // vlaidate userName
return BootstrapUser.RetrieveUserByUserName(value.UserName) == null; return BootstrapUser.RetrieveUserByUserName(value.UserName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == value.UserName);
} }
var ret = false; var ret = false;
if (value.UserName.Equals(User.Identity.Name, System.StringComparison.OrdinalIgnoreCase) || LgbPrincipal.IsAdmin(User)) if (value.UserName.Equals(User.Identity.Name, System.StringComparison.OrdinalIgnoreCase) || LgbPrincipal.IsAdmin(User))