Upozorňovací e-mail v modulu SelfRegistration

Česká/Slovenská podpora pro CMS Made Simple
Post Reply
rostislavk
Forum Members
Forum Members
Posts: 40
Joined: Fri Jul 04, 2008 10:01 pm

Upozorňovací e-mail v modulu SelfRegistration

Post by rostislavk »

Ahoj,

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;
  }
Nešlo by to nějak?

Díky za pomoc
kuzmany
Power Poster
Power Poster
Posts: 448
Joined: Tue Oct 10, 2006 5:00 pm

Re: Upozorňovací e-mail v modulu SelfRegistration

Post by kuzmany »

Ahoj,

notifikacia si mozes nastavit aj v module Frontend User v zalozke s nastaveniami.  Uplne na konci si mozes nadefinovat na rozne akcie notifikaciu, konkretne v tvojom pripade On New User Created. V sablone si mozes potom napisat aky chces text, takisto mozes pouzit vsetky dostupne smarty premenne.

Ja som tu notifikaciu prebehol len easy, ale nieco potodbne potrebujem aj ja, takze sa na to pozriem podrobnejsie snad
Yes, it's me: MleCMS, MleDomains, ModuleGenerator, URLWatchdog, Youtuber, Extended Content Blocks, Extended Tools, Analytics etc.
Post Reply

Return to “Czech/Slovak - Česky/Slovensky”