|
|
@ -6,11 +6,19 @@ public static class CurrentUserExtensions |
|
|
|
{ |
|
|
|
public static string GetUserName(this ICurrentUser currentUser) |
|
|
|
{ |
|
|
|
if (currentUser == null || currentUser.Name == null) //仅调试时用
|
|
|
|
{ |
|
|
|
return "admin"; |
|
|
|
} |
|
|
|
return currentUser.Name; |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetName(this ICurrentUser currentUser) |
|
|
|
{ |
|
|
|
if (currentUser == null || currentUser.Name == null) //仅调试时用
|
|
|
|
{ |
|
|
|
return "admin"; |
|
|
|
} |
|
|
|
return currentUser.Name; |
|
|
|
} |
|
|
|
} |
|
|
|