System.Web.Security.MembershipProvider.GetUser Method

Gets user information from the data source based on the unique identifier for the membership user. Provides an option to update the last-activity date/time stamp for the user.

Syntax

public abstract MembershipUser GetUser (object providerUserKey, bool userIsOnline)

Parameters

providerUserKey
The unique identifier for the membership user to get information for.
userIsOnline
true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.

Returns

A System.Web.Security.MembershipUser object populated with the specified user's information from the data source.

Remarks

Takes, as input, a unique identifier for a user record and a Boolean value indicating whether to update the MembershipUser.LastActivityDate value for the user to show that the user is currently online. The MembershipProvider.GetUser(object, bool) method returns a System.Web.Security.MembershipUser object populated with current values from the data source for the specified user. If the user name is not found in the data source, MembershipProvider.GetUser(object, bool) returns null.

Requirements

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