forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 ecards & email => Topic started by: MaxxFusion on February 04, 2006, 09:45:58 pm

Title: Change info in admin verification email
Post by: MaxxFusion on February 04, 2006, 09:45:58 pm
I want to change the info that gets sent to the admin one a new registration.  Right now the admin gets an email stating "username" has signed up.  I would like to include the email address and possiy a couple of the Profile fields in this email.  That way it will be easy to idnetify the user that is registering.

Thanks,
Frank
Title: Re: Change info in admin verification email
Post by: Stramm on February 05, 2006, 10:48:29 am
in db_input.php the email gets sent
Code: [Select]
                cpg_mail('admin', sprintf($lang_db_input_php['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_db_input_php['notify_admin_email_body'], USER_NAME,  $CONFIG['ecards_more_pic_target'].(substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .'editpics.php?mode=upload_approval' ));

before you'll have to add a sql query and read what you need from the users table. Add that to the var $lang_db_input_php['notify_admin_email_body']

the actual email subject and body can be found in the language files
Title: Re: Change info in admin verification email
Post by: MaxxFusion on February 05, 2006, 03:48:30 pm
Do you have an example of what that query would look like?
Title: Re: Change info in admin verification email
Post by: Stramm on February 05, 2006, 07:34:03 pm
had a look at it again... it's in register.php

Code: [Select]
                                                        cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));

You won't need a query but can use the vars $_POST['user_profile1'] - $_POST['user_profile6']

looks somehow like
Code: [Select]
$mailbody = $lang_register_php_def['notify_admin_email_body']."\n".$_POST['user_profile1']."\n".$_POST['user_profile1']."\n";
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($mailbody, $user_name));