Click or drag to resize

VGMembershipConvertUsernameToRepositoryId Method

Converts the username of a user to a Visual Guard unique repository id for the specified authentication mode

Namespace:  Novalys.VisualGuard.Security.Membership
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.0.101.19 (2019.0.0101.19)
Syntax
public static string ConvertUsernameToRepositoryId(
	string username,
	VGAuthenticationMode mode
)

Parameters

username
Type: SystemString
the username to convert
mode
Type: Novalys.VisualGuard.SecurityVGAuthenticationMode
the Visual Guard authentication mode

Return Value

Type: String
A Visual Guard unique repository id
Exceptions
ExceptionCondition
ArgumentNullExceptionusername is null.
ArgumentExceptionusername is empty.

- or -

mode is equal to VisualGuard and is longer than 64 characters or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').

- or -

mode is equal to Windows and username cannot be converted to a valid SID.

- or -

mode is not equal to Windows or VisualGuard or Database or is a combination of several values.
Remarks
The Visual Guard unique repository id is used by Visual Guard to identify uniquely a user account in a Visual Guard repository.
See Also