We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27531
    • 7 Posts
    Hi there,

    currently working on this fine WebLoginPE Snippet.

    This is my Snippet Call:
    [!WebLoginPE? &type=`simple` &regType=`verify` &lang=`de` &notify=`email.de` &groups=`mygrozup`!]

    The last thing, I want to achieve is:
    A new user should be unable to login until he is set "Active" in the Backend manually.
    Although he has obtained his Password via Mail...

    Can I trigger this via the MODX Tables?

    Someone has a good idea?

    Kind regards.

    K.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You could use a plugin using onWebSaveUser to block the login (set the "blocked" field to 1), then a manager would have to edit the user and clear the block. This would be better than using a hidden field in the registration form, since that can be spoofed from the browser.

      The plugin would need to check the values passed in by the event; $mode (I think) should be "new" for a new user and the new user ID is in the $user variable.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 1892
        • 82 Posts
        I’m not sure if it’s exactly what you’re after but as I seem to have posted earlier today this would be my suggestion :

        It’s not fully documented but there is a registration type called ’pending’ which as it suggest puts new registrants into a pending group. The admin gets an email and if ok can approve the registration, moving the registrant into the full membership group and sending them an email confirming approval.

        You don’t even need to go into the backend manager to enable user accounts. You can set up a template form for the admin person to list all users in the pending group. They can then review the requests and click a button to either "approve" or "reject" the applications.

        In which case this thread might help.http://modxcms.com/forums/index.php/topic,41231.0.html

        I hope this helps

        Adrian.
          • 27531
          • 7 Posts
          Hi Adrian,

          looks like it’s just the thing I need!
          Thanks for ya quick help.

          Kind regards

          K.