Admin Tools exposes a Joomla! plugin event that third-party extensions can dispatch to log a security exception through Admin Tools' own WAF infrastructure. This allows other extensions to take advantage of Admin Tools' blocked-request logging, email notifications, and IP auto-ban features without reimplementing them.
The event is named onAdminToolsThirdpartyException. It accepts the following named arguments:
A human-readable description of why the request was blocked, shown to site administrators in the Blocked Requests Log. For example: My extension detected a SQL injection attempt.
The message shown to the visitor whose request was blocked. If this parameter is empty the event is silently ignored and nothing is logged. Use a descriptive but non-technical message, as it is displayed directly to the end user.
An associative array of additional data to store alongside the blocked request record. Use it to capture context useful for later analysis, such as the matched pattern, the affected URL, or any other details relevant to your security check.
Example usage from a third-party plugin:
use Joomla\CMS\Factory;use Joomla\Event\Event;$event = new Event( 'onAdminToolsThirdpartyException', [ 'reason' => 'My extension detected suspicious activity', 'message' => 'Your request could not be processed.', 'extraInfo' => [ 'extension' => 'com_myextension', 'check' => 'sql_injection_pattern_x', ], ]);Factory::getApplication()->getDispatcher() ->dispatch('onAdminToolsThirdpartyException', $event);When this event is dispatched Admin Tools logs the blocked request, sends any configured email alerts, and applies the IP auto-ban rules exactly as it would for a request blocked by its own WAF filters. The blocked request will appear in the Blocked Requests Log with the reason code external.
The System — Admin Tools plugin must be published and loaded before your plugin dispatches this event. Because Admin Tools reorders itself to be the first system plugin, this is normally guaranteed. If you have disabled that auto-reorder behaviour in the component options, verify that the Admin Tools system plugin is ordered before your own plugin.