Editing a MembershipUser without changing itâs log
I have been trying to retrieve and update a MembershipUser properties without changing the MembershipUser loged on status for some reason I an unable to do it
protected void Page_Load(object sender, EventArgs e)
{
// retrieve the username from the querystring
userName = this.Request.QueryString["UserName"];
if (string.IsNullOrEmpty(userName))
userName = User.Identity.Name.ToString();
lblRolesFeedbackOK.Visible = false;
lblProfileFeedbackOK.Visible = false;
if (!this.IsPostBack)
{
// show the user's details
UserProfileControl1.UserName = userName;
MembershipUser user = Membership.GetUser(userName, false);
lblUserName.Text = user.UserName;
lnkEmail.Text = user.Email;
lnkEmail.NavigateUrl = "mailto:" + user.Email;
lblRegistered.Text = user.CreationDate.ToString("f");
lblLastLogin.Text = user.LastLoginDate.ToString("f");
lblLastActivity.Text = user.LastActivityDate.ToString("f");
chkOnlineNow.Checked = user.IsOnline;
chkApproved.Checked = user.IsApproved;
chkLockedOut.Checked = user.IsLockedOut;
chkLockedOut.Enabled = user.IsLockedOut;
BindRoles();
}
}
I but when I go back and try to view the status of the user I notice that there status has changed to logged on as well as there last activity has been updated can anyone please help me!
sh*t happens
|