Class UserContextExtensions
- Namespace
- Dynamicweb.Security.UserManagement
- Assembly
- Dynamicweb.Core.dll
Provides extension methods for UserContext.
public static class UserContextExtensions
- Inheritance
-
UserContextExtensions
- Inherited Members
Methods
GetRequiredUser(UserContext)
Retrieves the authenticated user from the specified UserContext. Throws an UserContextException if the user is not authenticated.
public static User GetRequiredUser(this UserContext userContext)
Parameters
userContextUserContextThe user context from which to retrieve the user.
Returns
Exceptions
- ArgumentNullException
Thrown if
userContextis null.- UserContextException
Thrown if the user is not authenticated.