[TYPO3-english] hook confirmRegistrationClass_postProcess in sr_feuser_register
Simon Child
simon at srchild.com
Tue Jun 22 15:23:30 CEST 2010
I've followed the instructions in the manual and I have hooks working under
sr_feuser_register for registrationProcess_afterSaveCreate and
registrationProcess_afterSaveEdit
Now I want to also use hook confirmRegistrationClass_postProcess and I have
followed the same procedure but can't get that to work. Am I doing something
wrong, or does this hook work differently (or not work at all?)
I've added a new function to the class containing my code for
registrationProcess_afterSaveCreate and registrationProcess_afterSaveEdit.
And I guess that class is initialised properly as those functions do work
function confirmRegistrationClass_postProcess($newRow, $thisx) {
debug($newrow);
$nuid = $newRow['uid'];
$query = "INSERT INTO tx_myext_mytable (abc, xyz) VALUES
('".$nuid."','1')";
$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, $query);
}
I have disabled auto-login on confirmation. I don't see any debug output on
the screen when clicking the email confirmation link, and no new data gets
written to thedatabase.
I've added an extra line for confirmRegistrationClass to ext_localconf.php
in the extension containing my class:
$TYPO3_CONF_VARS['EXTCONF']['sr_feuser_register']['tx_srfeuserregister_pi1']['registrationProcess'][]
=
'EXT:wcfmemfeusers/class.tx_wcfmemfeusers_srfeuser.php:tx_wcfmemfeusers_srfeuser';
$TYPO3_CONF_VARS['EXTCONF']['sr_feuser_register']['tx_srfeuserregister_pi1']['confirmRegistrationClass'][]
=
'EXT:wcfmemfeusers/class.tx_wcfmemfeusers_srfeuser.php:tx_wcfmemfeusers_srfeuser';
if (TYPO3_MODE=='FE'){
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sr_feuser_register']['extendingTCA'][]
= 'wcfmemfeusers';
}
In sr_feuser_register/ext_localconf.php this was commented out - I've tried
both with it commented and uncommented:
/*
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sr_feuser_register']['tx_srfeuserregister_pi1']['confirmRegistrationClass'][]
=
'EXT:sr_feuser_register/hooks/class.tx_srfeuserregister_hooksHandler.php:&tx_srfeuserregister_hooksHandler';
*/
(the corresponding line for registrationProcess is not commented out)
What am I doing wrong?
Thanks
--
Simon Child
More information about the TYPO3-english
mailing list