We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    I sent an email to Modx to ask for a bit of guidance, and they were so kind as to provide their update profile resource, here it is:

    [[!UpdateProfile?
    &placeholderPrefix=`up`
    &submitVar=`login-updprof-btn`
    &postHooks=`postHook.DiscussUpdateProfile`
    &useExtended=`1`
    &excludeExtended=`show_email,show_online,show_on_map,use_display_name,signature,birthdate,awards_opt_in,display_name,github_id`
    &reloadOnSuccess=`0`
    &validate=`signature:allowTags,
    email:required:email`
    ]]


    and the loader:

    [[!DiscussUpdateProfileLoader?
    &useExtended=`1`
    &excludeExtended=`show_email,show_online,show_on_map,use_display_name,signature,birthdate,awards_opt_in,display_name,github_id`
    ]]
      • 46886
      • 1,154 Posts
      And here are some useful notes:

      1. the user profile update is a combination of the Login Snippet's UpdateProfile sub-snippet and a posthook found in the Discuss project: https://github.com/modxcms/Discuss/blob/develop/core/components/discuss/elements/snippets/posthook.discussupdateprofile.php

      2. [The profileloader] loads the values stored in the fields for discuss and extended user fields. They can be found and referenced here:

      https://github.com/modxcms/Discuss/blob/develop/core/components/discuss/elements/snippets/snippet.discussupdateprofileloader.php

      The current Discuss (Discuss 1) uses the extended field birthdate rather than the MODX user date.

      Thanks so much to Jay and Modx for this help! It really is extremely valuable!
        • 46220
        • 66 Posts
        This will actually help me in my last bits for my website. Thanks for digging into this Andrew smiley.
          • 46886
          • 1,154 Posts
          The thanks goes to Jay Gilmore at MODX, he listened to my plea for some certainty haha. I really appreciated his assistance.

          The key was that they also don't try to deal with age within the normal profile, or even through the Discuss profile, but instead just make an extended field. So whereas before I didn't like the idea of using a lot of extended fields, now I realize that its fine, just make a bunch of them. However that does mean I need a script to access those fields, but that's not too hard.