Copied to clipboard

Flag this post as spam?

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


  • Jay Dobson 75 posts 121 karma points
    Apr 15, 2011 @ 20:15
    Jay Dobson
    0

    Custom Change Password Dashboard Plugin

    Hey All,

    There currently exists a bug in Umbraco 4.7 such that the current change password dashboard control causes other dashboard controls to not be able to post back.  The workaround for this is to hide the change password control, which I've done.  Seeing as how the business users still very much want to be able to change their passwords I decided to create a quick little change password control.  It seemed simple enough, in theory, but Im having nothing but problems with it now.

    I've tried both of the following lines to get a reference to the logged-in member:

    Member m = Member.GetCurrentMember();
    Member m = Member.GetMemberFromLoginName(UmbracoEnsuredPage.CurrentUser.LoginName);

    In both cases m comes back null.  I've checked UmbracoEnsuredPage.CurrentUser.LoginName and it is returning the correct login.

    All I want to do is be able to cal m.ChangePassword("newpass"); and I can't.  I'm pulling my hair out over this one!

    Any help would be greatly appreciated. :)

    Jay

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 15, 2011 @ 20:27
    Tom Fulton
    0

    Hi,

    Pretty sure the Member. functions are for front-end "Members", not back end "Users", which is probably why you're not getting anything!

    I think there's a User.GetCurrent() for what you need.

    Also your best bet might be to check out the source for the existing Change Password control to start with.  If I recall the only problem with it is that it needs a ValidationProperty or something similar.

    -Tom

  • Jay Dobson 75 posts 121 karma points
    Apr 15, 2011 @ 22:07
    Jay Dobson
    0

    Bah, yeah I was confusing members with users.  I'll take a look at the source.

    Thanks Tom

  • Nigel Wilson 944 posts 2076 karma points
    Aug 04, 2011 @ 19:52
    Nigel Wilson
    0

    You can keep the change password control in to the dashboard.

    Adding the "validationGroup" to the change password functionality user control (/unbraco/dashboard/ChangePassword.ascx) fixes the issue.

    It is detailed here and I have just successfully tried it.

    Hope this helps.

    Nigel

Please Sign in or register to post replies

Write your reply to:

Draft