potřeboval bych poradit s tímhle:
uživatele se registrují pomocí modulu SelfRegistration. Registrační formulář obsahuje kromě uživatelského jména a hesla ještě detaily uživatele (jméno, adresa, telefon, atd.), které jsou definovány pomocí modulu FrontEndUsers.
Potřeboval bych poslat upozornění e-mailem, když se někdo zaregistruje. To jde, v adminu modulu SelfRegistration zaškrtnu tuto možnost a funguje to. V došlém e-mailu je hláška s upozorněním a uživatelské jméno. Problém je v tom, že chci v tom upozorňovacím e-mailu mít i výpis detailů toho konkrétního uživatele.
O tohle se stará soubor SelfRegistration.module.php a tenhle kod:
Code: Select all
// and notify the administrator
// if the admin wants notifications.
// off we go.
if( $this->GetPreference('notify_on_registration') )
{
$cmsmailer =& $this->GetModuleInstance('CMSMailer');
if( !$cmsmailer )
{
return $this->Lang('error_nocmsmailermodule');
}
$cmsmailer->AddAddress($this->GetPreference('send_emails_to'));
$cmsmailer->SetSubject('A new user has registered on '.$gCms->config['root_url']);
$msg = 'A new user ('.$username.') has completed registration to your site. you should check this user out and validate that the information provided is as complete and valid as possible.';
$cmsmailer->SetBody($msg);
$cmsmailer->IsHTML(false); // we're not sending an html mail
$cmsmailer->Send();
}
$this->Audit( 0, $this->Lang('friendlyname'),
$this->Lang('info_userverified').": ".$username);
return 0;
}
Díky za pomoc