System.Web.Security.Membership.GetUserNameByEmail Method

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

Syntax

public static string GetUserNameByEmail (string email)

Parameters

email
Documentation for this section has not yet been entered.

Returns

The user name where the e-mail address for the user matches the specified e-mail address. If no match is found, null is returned.

Remarks

Membership.GetUserNameByEmail(string) 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.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0