Announcement

#1 2003-11-09 13:47:30

PDG
Guest

Send E-mail When New User Registered

Hi,

I would like to receive an email when a user register on the gallery. I think it will be quite easy since there is already a function to receive email when a comment is added. But I don't find where is this function ???

Thanks.

 

#2 2003-11-09 14:53:51

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Send E-mail When New User Registered

function is "notify", you'll find it in the include/functions.inc.php :-D

Offline

 

#3 2003-11-09 15:28:07

PDG
Guest

Re: Send E-mail When New User Registered

OK, thanks a lot.

For anyone wants to do the same thing :

I have modified the file functions.inc.php :

Code:

// add by me, for reveive email when new_user
    case 'new_user' :
      $subject = $lang['mail_new_user_subject'];
      $content.= $lang['mail_new_user_content'];
      break;
// end add by me

Then, the file language/francais.php where I add the translation for mail_new_user_subject and _content

And, the file register.php :

Code:

//----------------------------------------------------------- user registration
$error = array();
if ( isset( $_POST['submit'] ) )
{
  $error = register_user( $_POST['login'], $_POST['password'],
                          $_POST['password_conf'], $_POST['mail_address'] );
  if ( sizeof( $error ) == 0 )
  {
    $session_id = session_create( $_POST['login'] );
    $url = 'category.php?id='.$session_id;
    header( 'Request-URI: '.$url );
    header( 'Content-Location: '.$url );  
    header( 'Location: '.$url );
        // mail notification for administrators
        if ( $conf['mail_notification'] )
        {
                notify('new_user',$_POST['login']);
        }
        // end mail notification
    exit();
  }
}
 

#4 2005-03-20 18:16:30

bernatus
Guest

Re: Send E-mail When New User Registered

Would someone know why I get two emails instead of one when a new user registers ?

The first email does not have the user login at the end, the second has it.

I tried to understand but could not find the answer.

Hosting = free.fr, I modified removed $options in the mail instruction to be compatible with free.fr. Can it come from there ?

Thanks.

 

#5 2005-04-06 16:28:59

Tcherno
Member
Issy-les-moulineaux (France)
2004-06-09
194

Re: Send E-mail When New User Registered

PDG wrote:

OK, thanks a lot.

For anyone wants to do the same thing :

I have modified the file functions.inc.php :

Code:

// add by me, for reveive email when new_user
    case 'new_user' :
      $subject = $lang['mail_new_user_subject'];
      $content.= $lang['mail_new_user_content'];
      break;
// end add by me

Then, the file language/francais.php where I add the translation for mail_new_user_subject and _content

And, the file register.php :

Code:

//----------------------------------------------------------- user registration
$error = array();
if ( isset( $_POST['submit'] ) )
{
  $error = register_user( $_POST['login'], $_POST['password'],
                          $_POST['password_conf'], $_POST['mail_address'] );
  if ( sizeof( $error ) == 0 )
  {
    $session_id = session_create( $_POST['login'] );
    $url = 'category.php?id='.$session_id;
    header( 'Request-URI: '.$url );
    header( 'Content-Location: '.$url );  
    header( 'Location: '.$url );
        // mail notification for administrators
        if ( $conf['mail_notification'] )
        {
                notify('new_user',$_POST['login']);
        }
        // end mail notification
    exit();
  }
}

It's that ok for 1.4.0 ? And for any language ?
thanks


"Mon métier est de voir et faire voir. Je ne ressens pas la nécessité d'en changer" Jean Lattès Photojournaliste (1917-1996)

Offline

 

#6 2005-05-06 21:07:57

strotti
Guest

Re: Send E-mail When New User Registered

i tried to modify the files you specify but i don t think i did the right thing 'cause once done, i couldn t log on the gallery anymore.

i put your modification at the end of each file. but i don t think that this is the right way.

could you tell me where to put them please?

i m using phpwebgallery 1.4

 

#7 2005-05-07 14:47:11

Tcherno
Member
Issy-les-moulineaux (France)
2004-06-09
194

Re: Send E-mail When New User Registered

Well... J'aimerai bien également recevoir des mails quand un nouveau visiteur s'enregistre 8-)
Quelqu'un pourrait il donner la solution en français ?


"Mon métier est de voir et faire voir. Je ne ressens pas la nécessité d'en changer" Jean Lattès Photojournaliste (1917-1996)

Offline

 

#8 2005-05-15 23:29:41

strotti
Guest

Re: Send E-mail When New User Registered

Bonjour Zorg, (si je puis me permettre lol),

toi qui est le maitre du php, pourrais tu me repondre ou je dois inserer ces fichiers stp?

merci d avance

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact