Modx Evo 1.2 Remove Unverified Users


I have a old Modx Evo 1.2.1 Site that has around 2200 Spam Users. I need to first remove these users and was hoping to get some guidance on a quick way to do this via SQL query or processor. I did find some processor code but have no idea on how to run it:

<?php /** * Remove expired processor * * @package login * @subpackage processor */ class RemoveExpiredProcessor extends modProcessor { public function process() { $c = $this->modx->newQuery('modUser'); $c->where(array( 'cachepwd:!=' => '', 'active' => false, 'createdon:<=' => strtotime('-12 hour') )); /** @var modUser[] $users */ $users = $this->modx->getIterator('modUser', $c); foreach ($users as $user) { $user->remove(); } if (php_sapi_name() == 'cli') { exit (0); } else { return $this->success(); } } } return 'RemoveExpiredProcessor'; Modx 1.2.1

This forum is only for MODX Revolution.

The Evo specific forum is here:

I’m not familiar with MODX Evo, but if it works similar to Revolution, you could try copying the code from the process() function into a snippet, change $this->modx to $modx and remove the if (php_sapi_name() == 'cli') part. Then create a page that calls the snippet and open it in the browser.