Click or drag to resize

VGMembershipInstanceGetUserNameByEmail Method

Gets a user name where the e-mail address for the user matches the specified e-mail address.

Namespace:  Novalys.VisualGuard.Security.Membership
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
public string GetUserNameByEmail(
	string emailToMatch
)

Parameters

emailToMatch
Type: SystemString
The e-mail address to search for.

Return Value

Type: String
The user name where the e-mail address for the user matches the specified e-mail address. If no match is found, a null reference (Nothing in Visual Basic) is returned.
Exceptions
ExceptionCondition
ArgumentNullExceptionemailToMatch is null.
ArgumentExceptionemailToMatch is empty or longer than 64 characters after trimming.
Remarks

GetUserNameByEmail can be used to retrieve the user name for a membership user in the case where a user does not know their user name, but does know their e-mail address. If more than one user in the data store has the same e-mail address, the first user name encountered is returned.

Leading and trailing spaces are trimmed from all parameter values.
See Also