Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tony 4 posts 54 karma points
    Mar 26, 2013 @ 19:20
    Tony
    0

    Instantiate Member Object Based on Currently Selected User in Dashboard

    We have a low security (nothing sensitive) member area so our member passwords are stored clear.

     

    Members call us from time to time asking for their passwords b/c they forgot them. 

     

    I was thinking a dataType using the "Umbraco Usercontrol Wrapper" to just query the Member and display the password would work fine, and I could just add it to the [Member Types] Generic properties.

     

    However is there a way for that control to determine the currently selected user in the Members Dashboard so I can instantiate a Member object based on whatever member is currently selected?

  • Tony 4 posts 54 karma points
    Mar 26, 2013 @ 19:37
    Tony
    100

    OK after several hours of countless searches and failures, I found the following 10 mins after posting the above, and it seems to work!

    protected void Page_Load(object sender, EventArgs e) {      
    int currentID  = int.Parse(Request["id"]);
    var currentMember = new Member(currentID);
    PasswordLabel.Text = currentMember.Password;
    }

     Is this best practice?

Please Sign in or register to post replies

Write your reply to:

Draft