MembershipProvider.GetUser MembershipProvider.GetUser MembershipProvider.GetUser MembershipProvider.GetUser Method

Definition

Gets information from the data source for a membership user.

Overloads

GetUser(String, Boolean) GetUser(String, Boolean) GetUser(String, Boolean) GetUser(String, Boolean)

Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.

GetUser(Object, Boolean) GetUser(Object, Boolean) GetUser(Object, Boolean) GetUser(Object, Boolean)

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.

GetUser(String, Boolean) GetUser(String, Boolean) GetUser(String, Boolean) GetUser(String, Boolean)

Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.

public:
 abstract System::Web::Security::MembershipUser ^ GetUser(System::String ^ username, bool userIsOnline);
public abstract System.Web.Security.MembershipUser GetUser (string username, bool userIsOnline);
abstract member GetUser : string * bool -> System.Web.Security.MembershipUser
Public MustOverride Function GetUser (username As String, userIsOnline As Boolean) As MembershipUser

Parameters

username
String String String String

The name of the user to get information for.

userIsOnline
Boolean Boolean Boolean Boolean

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 MembershipUser object populated with the specified user's information from the data source.

Examples

For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

Remarks

Takes, as input, a user name and a Boolean value indicating whether to update the LastActivityDate property value for the user to show that the user is currently online. GetUser returns a 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, GetUser returns null.

See also

GetUser(Object, Boolean) GetUser(Object, Boolean) GetUser(Object, Boolean) GetUser(Object, Boolean)

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.

public:
 abstract System::Web::Security::MembershipUser ^ GetUser(System::Object ^ providerUserKey, bool userIsOnline);
public abstract System.Web.Security.MembershipUser GetUser (object providerUserKey, bool userIsOnline);
abstract member GetUser : obj * bool -> System.Web.Security.MembershipUser
Public MustOverride Function GetUser (providerUserKey As Object, userIsOnline As Boolean) As MembershipUser

Parameters

providerUserKey
Object Object Object Object

The unique identifier for the membership user to get information for.

userIsOnline
Boolean Boolean Boolean Boolean

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 MembershipUser object populated with the specified user's information from the data source.

Examples

For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

Remarks

Takes, as input, a unique identifier for a user record and a Boolean value indicating whether to update the LastActivityDate value for the user to show that the user is currently online. The GetUser method returns a 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, GetUser returns null.

See also

Applies to