Table of Contents

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

userContext UserContext

The user context from which to retrieve the user.

Returns

User

The authenticated User.

Exceptions

ArgumentNullException

Thrown if userContext is null.

UserContextException

Thrown if the user is not authenticated.

To top