MembershipProvider.GetUserNameByEmail(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the user name associated with the specified email address.
public:
abstract System::String ^ GetUserNameByEmail(System::String ^ email);
public abstract string GetUserNameByEmail(string email);
abstract member GetUserNameByEmail : string -> string
Public MustOverride Function GetUserNameByEmail (email As String) As String
- String
The email address to search for.
The user name associated with the specified email address. If no match is found, return null
.
For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
Takes, as input, an email address and returns the first user name from the data source where the email address matches the supplied email
parameter value.
If no user name is found with a matching email address, null
is returned.
If multiple user names are found that match a particular email address, only the first user name found should be returned. You can implement a custom mechanism for ensuring a unique email address for each user name such as the RequiresUniqueEmail property supported by the SqlMembershipProvider provider.
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: