-
☆ A M B ☆
- 43 Posts
Hi All,
I am writing a plugin to run when a user is deleted. I want to show either a console window or just a simple message box showing details about what has been deleted e.g.:
"
Deleting extended user data...
1.234 Messages removed successfully...
567 Images removed successfully...
89 Valuable data removed successfully...
Facebook data removed successfully...
Twitter data removed successfully...
User was successfully removed!
"
$modx->event->output('MESSAGE') can only be used for errors hence it stops the execution.
So does anyone have any suggestions to how I can do this in my plugin?
-
☆ A M B ☆
- 3,141 Posts
You'd probably need to find a way to hook into the JS that sends the request to delete the user (e.g. override a click handler) to open up the MODx.Console and to send along the register and topic variables to the connector which instantiates the registry..
.. then in the processor (or the plugin) you should be able of sending data to the console by using $modx->log(modX::LOG_LEVEL_{LEVEL}, 'Foobar messages removed');
Does sound like a challenge tho.. be sure to report back when you have it working