Gets or sets the current principal.
Namespace:
EPiServer.SecurityAssembly: EPiServer (in EPiServer.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
public static IPrincipal CurrentPrincipal { get; set; } |
Field Value
The current principal.
Remarks
This method will use the HttpContext.Current.User setting if an HttpContext exists, otherwise
it will fall back to the the Thread.CurrentPrincipal setting.
When you get the current principal you are assured to always get a valid IPrincipal.