Subject: Editing a MembershipUser without changing it’s log
Posted By: madok Post Date: 9/13/2006 9:42:58 PM
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

Go to topic 29530

Return to index page 175
Return to index page 174
Return to index page 173
Return to index page 172
Return to index page 171
Return to index page 170
Return to index page 169
Return to index page 168
Return to index page 167
Return to index page 166