May 26th, 2007
Found a bug in sr_feuser_register
Found a bug in sr_feuser_register (2.5.6):
When I try to combine both features, disable emailconfirmation (setfixed = false) and autologin after creating an account, I experience two strange behaviors:
- - The Template “a mail has been send … toconfirm” is shown after creation, even though he setfixed-feature is disabled
- Autologin doesn’t happen
after some debugging effort I supposably found a bug.
I used the following constants in template:
plugin.tx_srfeuserregister_pi1.enableEmailOnApprove = 0SOLUTION:
plugin.tx_srfeuserregister_pi1.useMd5Password = 0
plugin.tx_srfeuserregister_pi1.enableAutoLoginOnCreate = 1
plugin.tx_srfeuserregister_pi1.userGroupAfterConfirmation = 4
plugin.tx_srfeuserregister_pi1.formFields =
username, password, gender, first_name, last_name, email,
address, zip, city, static_info_country
plugin.tx_srfeuserregister_pi1.enableEmailConfirmation = 0
plugin.tx_srfeuserregister_pi1.pid = 264
plugin.tx_srfeuserregister_pi1.userGroupAfterAcceptation = 4
plugin.tx_srfeuserregister_pi1.userGroupUponRegistration = 4
plugin.tx_srfeuserregister_pi1.enableAutoLoginOnConfirmation = 0
plugin.tx_srfeuserregister_pi1.loginPID = 229
plugin.tx_srfeuserregister_pi1.defaultCODE = CREATE
plugin.tx_srfeuserregister_pi1.file.templateFile =
fileadmin/templates/tx_srfeuserregister_pi1_css_tmpl.html
class: tx_srfeuserregister_pi1
funtion: init()
the lines
if (isset($this->conf['setfixed'])) {have to be located BEFORE the call
$this->setfixedEnabled = $this->conf['setfixed'];
}
$this->control->init(…because the init function of tx_srfeuserregister_control references the pibase-member setfixedEnabled. Otherwise the setfixedEnabled used by the control class will always be true even though setfixed is set to false (enableEmailConfirmation = 0)
$this, $this->conf, $this->config, $this->display,
$this->data, $this->marker, $this->auth, $this->email, $this->tca);
——————————–
SOLUTION
——————————–
CLASS: tx_srfeuserregister_pi1
function init(&$conf) {
global $TSFE, $TCA, $TYPO3_CONF_VARS;
// plugin initialization
$this->conf = $conf;
if (t3lib_extMgm::isLoaded('sr_freecap') ) {
require_once(t3lib_extMgm::extPath('sr_freecap').'pi2/class.tx_srfreecap_pi2.php');
$this->freeCap = t3lib_div::makeInstance('tx_srfreecap_pi2');
}
$this->lang = t3lib_div::makeInstance('tx_srfeuserregister_lang');
$this->data = t3lib_div::makeInstance('tx_srfeuserregister_data');
$this->auth = t3lib_div::makeInstance('tx_srfeuserregister_auth');
$this->marker = t3lib_div::makeInstance('tx_srfeuserregister_marker');
$this->tca = t3lib_div::makeInstance('tx_srfeuserregister_tca');
$this->display = t3lib_div::makeInstance('tx_srfeuserregister_display');
$this->email = t3lib_div::makeInstance('tx_srfeuserregister_email');
$this->control = t3lib_div::makeInstance('tx_srfeuserregister_control');
// BUGFIX Oliver Meimberg
// ADD THIS HERE
if (isset($this->conf['setfixed'])) {
$this->setfixedEnabled = $this->conf['setfixed'];
}
$this->lang->init($this, $this->conf, $this->config);
$this->lang->pi_loadLL();
$this->data->init($this, $this->conf, $this->config,
$this->lang, $this->tca, $this->auth, $this->control, $this->freeCap);
$this->control->init($this, $this->conf, $this->config, $this->display,
$this->data, $this->marker, $this->auth, $this->email, $this->tca);
$this->pi_USER_INT_obj = 1;
$this->pi_setPiVarDefaults();
$this->sys_language_content =
t3lib_div::testInt($TSFE->config['config']['sys_language_uid']) ?
intval($TSFE->config['config']['sys_language_uid']) : 0;
// prepare for character set settings
if ($TSFE->metaCharset) {
$this->charset = $TSFE->csConvObj->parse_charset($TSFE->metaCharset);
}
// Initialise fileFunc object
$this->fileFunc = t3lib_div::makeInstance(’t3lib_basicFileFunctions’);
// BUGFIX Oliver Meimberg
// REMOVE THIS
// if (isset($this->conf['setfixed'])) {
// $this->setfixedEnabled = $this->conf['setfixed'];
// }
[...]
}


2 Responses to “Found a bug in sr_feuser_register”
Hallo Herr Meimberg!
Seit geraumer Zeit bin ich treuer Leser Ihres Blogs und finde Ihrer Beiträge qualitativ hochwertig. In meinem Blog habe ich seit kurzer Zeit eine Serie von Beträgen gestartet, in denen ich interessante deutschsprachige Weblogs über Java vorstellen möchte. Die Idee dabei: Nicht einfach auf den Blog verlinken, sondern auch den Autor des Blogs in Form eines kleinen Interviews vorstellen. Gerne würde ich auch Ihren Blog präsentieren und würde mich sehr freuen wenn Sie mir folgende Interview Fragen beantworten würden:
Wer bloggt hier? (Name, Beruf, Wohnort, …)
Wie kamen Sie mit der Programmiersprache “Java” das erste mal in Berührung?
Warum bloggen Sie bzw. welche konkreten Ziele haben Sie?
Was sind Ihre drei Lieblingsblogs?
Was möchten Sie noch sagen?
Antworten Sie bitte nach Möglichkeit per Email.
In der Hoffnung, dass Sie bei dieser Aktion mitmachen, bedanke ich mich und wünsche Ihnen weiterhin viel Spaß und Erfolg beim Bloggen.
Beste Grüße
Eduard Hildebrandt
May 29th, 2007 at 10:13
480f4c3590…
480f4c3590…
April 23rd, 2008 at 04:48
Leave a Reply