How to extend/override Captcha controller?
Permalink
Does anyone know how to extend or override the Captcha controller in order to customize it without the src folder? I want to add random number length, my own colors etc. to be used only in my block, not throughout the site.
Is it possible at all? Because the $securimage variable is set as protected, not public, in the constructor of the SecurimageController.
Thank you.
Is it possible at all? Because the $securimage variable is set as protected, not public, in the constructor of the SecurimageController.
Thank you.
I think what you really need to do is to create a completely new captcha. That way, there will be no overrides involved and you will have all aspects of the intricate code under your control.
If I declare my own class, how do I do that from the view.php? At the moment it's done by
If I do that in the application/src/Captcha folder, then it will override the system controller throughout the whole site. I only want to change some captcha properties only in my block, not the whole site.
$captcha = Core::make('helper/validation/captcha');
If I do that in the application/src/Captcha folder, then it will override the system controller throughout the whole site. I only want to change some captcha properties only in my block, not the whole site.