System.Web.Security.MembershipUser.LastLoginDate Property

Gets or sets the date and time when the user was last authenticated.

Syntax

public virtual DateTime LastLoginDate { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

For new users, the MembershipUser.LastLoginDate is equal to the MembershipUser.CreationDate if the user has not yet logged on. The MembershipUser.LastLoginDate is updated to the current date and time if a call to the Membership.ValidateUser(string, string) method is successful.

You can also modify the last login date by setting the MembershipUser.LastLoginDate property of a System.Web.Security.MembershipUser and passing the modified System.Web.Security.MembershipUser object to the Membership.UpdateUser(MembershipUser) method.

The System.Web.Security.SqlMembershipProvider sets the MembershipUser.CreationDate, MembershipUser.LastLoginDate, MembershipUser.LastActivityDate, and MembershipUser.LastPasswordChangedDate date to the same date and time when a membership user is created by the erload:System.Web.Security.Membership.CreateUser method.

Requirements

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