Implement Hook after successful validation
After validating user
After validation the hook validationSuccessfulPostProc
is called. To bind one of your functions to this hook you can add the following line to your ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/doubleoptin/Classes/DoubleoptinController']['validationSuccessfulPostProc'][] = 'YourVendor\YourExtension\FoldersBelowClassesFolder\YourClass->yourFunction';
This would lead to the Function public function yourFunction(&$params, &$ref)
of slass YourVendor\YourExtension\FoldersBelowClassesFolder\YourClass
to be called. The Variable $ref
contains the DoubleoptinController
class.
You can access the Doubleoptin by accessing the class variable: $ref->doubleoptin
. Changes to the Doubleoptin will be persisted by DoubleoptinController afterwards.
Example
ext_localconf.php
<?php
// [...]
// register your method with the hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/doubleoptin/Classes/DoubleoptinController']['validationSuccessfulPostProc'][] =
'Vendor\Extension\Hooks\Selfregistration->hookDemo';
Classes/Hooks/Selfregistration.php
<?php
namespace Vendor\Extension\Hooks;
class Selfregistration
{
public function hookDemo(&$params, &$ref)
{
// whatever you want to do...
}
}