修改BUG:比较登陆用户名应该忽略大小写

This commit is contained in:
Argo-Lenovo 2016-12-16 10:57:42 +08:00
parent 2998a282bb
commit 2642e830dd
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ namespace Bootstrap.Admin.Controllers
}
var ret = false;
var userName = User.Identity.Name;
if (value.UserName == userName && !LgbPrincipal.IsAdmin(userName))
if (value.UserName.Equals(userName, System.StringComparison.OrdinalIgnoreCase) && !LgbPrincipal.IsAdmin(userName))
{
if (value.UserStatus == 1)
ret = UserHelper.SaveUserInfoByName(value);