We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38323
    • 26 Posts
    I am using the UpdateProfile Snippet to update user profiles via frontend. By using the &user property we can define wich profile to update:

    [[!UpdateProfile? &user=`[[+id]]` &useExtended=`1` &validate=`fullname:required,email:required:email`]]


    Updating works, but when trying tot use a dynamic [[+id]], let's say from url-params, the [[+id]] isn't used by UpdateProfile. Instead the (default) logged in users' id is used.

    I tried using $_GET in a snippet to echo the ID from url-params. Echoing works, but nog inside the UpdateProfile call. Finally used a $_SESSION to get the values working inside the UpdateProfile call. It works, but doesn't seem the best solutions.

    Any ideas?
    • What were you using to return the $_GET?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 38323
        • 26 Posts
        Custom snippet getVar:
        <?php
        return $_GET[$getvar];


        [[!getVar? &getvar=`userid`]]

        Snippet does returns correct value, obvious.