[TYPO3] sr_feuser_register: edit doesn't work anymore
Pieter
pieter.v at gmx.net
Sun Apr 30 12:31:36 CEST 2006
Susanne Moog wrote:
> Hello everyone.
>
> Posted this question in the german list already, but got only one answer
> confirming my problem, so it might be a bug, but I want to ask you guys
> before filing a bugreport.
>
Hello Susanne,
I don't have any problem with this. Seems to work fine. My configuration:
CONST:
plugin.tx_srfeuserregister_pi1.userGroupUponRegistration = 2
plugin.tx_srfeuserregister_pi1.userGroupAfterConfirmation = 1
plugin.tx_srfeuserregister_pi1.pid = 11
plugin.tx_srfeuserregister_pi1.loginPID = 45
plugin.tx_srfeuserregister_pi1.registerPID = 50
plugin.tx_srfeuserregister_pi1.editPID = 51
plugin.tx_srfeuserregister_pi1.confirmPID = 52
plugin.tx_srfeuserregister_pi1.usernameAtLeast = 0
plugin.tx_srfeuserregister_pi1.email =
plugin.tx_srfeuserregister_pi1.pidTitleOverride =
plugin.tx_srfeuserregister_pi1.siteName =
plugin.tx_srfeuserregister_pi1.formFields = password, gender,
first_name, last_name, email, address,zip,city,zone,
static_info_country, telephone, tx_vivuser_phone2, language, title, www,
image,
disable,tx_vivuser_comchannel,tx_vivuser_signedmanifest,tx_vivuser_nickname,tx_vivuser_structuredmessage,tx_vivuser_birth_day,tx_vivuser_birth_month,tx_vivuser_birth_year
plugin.tx_srfeuserregister_pi1.requiredFields =
first_name,last_name,email,password,tx_vivuser_signedmanifest,tx_vivuser_birth_day,tx_vivuser_birth_month,tx_vivuser_birth_year
plugin.tx_srfeuserregister_pi1.passwordAtLeast = 3
plugin.tx_srfeuserregister_pi1.generateUsername = 1
plugin.tx_srfeuserregister_pi1.file.templateFile =
fileadmin/template/feuserregister/register_lid_pi1_css_tmpl.html
plugin.tx_srfeuserregister_pi1.maxImages = 1
plugin.tx_srfeuserregister_pi1.salutation = informal
plugin.tx_srfeuserregister_pi1.useShortUrls = 1
SETUP:
config.notification_email_urlmode = all
plugin.tx_srfeuserregister_pi1.parseValues {
first_name = trim,alpha
last_name = trim,alpha
tx_vivuser_birth_day = trim,num
tx_vivuser_birth_month = trim,num
tx_vivuser_birth_year = trim,num
}
plugin.tx_srfeuserregister_pi1.create.overrideValues.module_sys_dmail_html
= 0
I use a hook function to make an auto-generated username based on
firstname/lastname. Looks like this:
class tx_vivuser_hooksFEUserRegister {
function registrationProcess_afterSaveEdit($recordArray, &$invokingObj) {
//echo 'afterSaveEdit';
}
function registrationProcess_beforeConfirmCreate(&$recordArray,
&$invokingObj) {
if ($invokingObj->feUserData['preview'] &&
$invokingObj->conf[$invokingObj->cmdKey.'.']['generateUsername']) {
$shortname = substr(strtolower(trim($recordArray[first_name])),0,1) .
substr(strtolower(trim($recordArray[last_name])),0,2);
$counter = 1;
$DBrows =
$GLOBALS['TSFE']->sys_page->getRecordsByField($invokingObj->theTable,
'username', $shortname."$counter", 'LIMIT 1');
while($shortname."$counter" && $DBrows) {
$counter = $counter + 1;
$DBrows =
$GLOBALS['TSFE']->sys_page->getRecordsByField($invokingObj->theTable,
'username', $shortname."$counter", 'LIMIT 1');
}
$recordArray[username] = $shortname."$counter";
}
}
}
if (defined("TYPO3_MODE") &&
$TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/vivuser/hooks/class.tx_vivuser_hooksHandler.php"])
{
include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/vivuser/hooks/class.tx_vivuser_hooksHandler.php"]);
}
More information about the TYPO3-english
mailing list