We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    You can add a field (or a checkbox) to the management form to block or unblock a user. One change needs to be made to the core code; on line 894 of assets/snippets/webloginpe/webloginpe.class.php
    $generalElementsArray = array('fullname','email','phone','mobilephone','dob','gender','country','state','zip','fax','photo','comment');
    
    add ’blocked’, between ’mobilephone’, ’dob,
    		$generalElementsArray = array('fullname','email','phone','mobilephone','blocked','dob','gender','country','state','zip','fax','photo','comment');
    

    Now you can use [+view.blocked+] to display the blocked status, and change the value (0 or 1) to block or unblock from the WebLoginPE manager view.

    I changed the default value in the database from 0 to 1 so that newly registered users cannot log in until their account has been approved. True, this could be done from the MODx Manager’s user management, but it’s a lot easier if everything is in one place.
      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