修改BUG,如果登陆用户是网站配置的超级管理员,无法显示DisplayName导致异常
This commit is contained in:
parent
8d81c4b85d
commit
a69c9df63e
|
@ -61,6 +61,7 @@ namespace Bootstrap.DataAccess
|
|||
/// <returns></returns>
|
||||
public static User RetrieveUsersByName(string userName)
|
||||
{
|
||||
if (Longbow.Security.Principal.LgbPrincipal.IsAdmin(userName)) return new User() { DisplayName = "网站管理员", UserName = userName };
|
||||
string key = string.Format("{0}{1}", UserDisplayNameDataKey, userName);
|
||||
return CacheManager.GetOrAdd(key, CacheSection.RetrieveIntervalByKey(UserDisplayNameDataKey), k =>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue