Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 811
old hand
old hand
Joined: Jun 2006
Posts: 811
Currently, when a new use registers you will can elect to receive an email with the person's:
Email Address:
Display Name:
IP Address:

Anyone know how to add Username to the list of fields in the email?

Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
Well, it's in "scripts/verifyemail.inc.php" in the block:
Code
		// -------------------------------------------------------------------------
		// Send out an email only to admins who want to receive them for new signups
		$query = "
			SELECT up.USER_REAL_EMAIL, up.USER_NOTIFY_NEW_USER, up.USER_LANGUAGE, u.USER_DISPLAY_NAME
			FROM  {$config['TABLE_PREFIX']}USER_PROFILE up,
						{$config['TABLE_PREFIX']}USERS u
			WHERE	u.USER_MEMBERSHIP_LEVEL = 'Administrator'
				AND	up.USER_ID = u.USER_ID
				AND up.USER_NOTIFY_NEW_USER = '1'
		";
		$sth = $dbh -> do_query($query,__LINE__,__FILE__);
	
		$mailer = new mailer();
		while(list($adminemail,$notify_newuser,$lang,$username) = $dbh -> fetch_array($sth)) {
			if (!$adminemail) continue;
	
			$mailer->set_language($lang);
			$mailer->set_subject('REGN_SUBJECT', array('BOARD_TITLE' => $config['COMMUNITY_TITLE']));
			$mailer->set_salute('EMAIL_SALUTE', array('USERNAME' => $username));
			$subs = array(
				'EMAIL_ADDY' => $regemail,
				'DISPLAY_NAME' => $newusername,
				'IP_ADDY' => $regip);
			$mailer->add_content('REGN_CONTENT', $subs);
			// Tell them they need to moderate or just be informative
			if ($config['NEW_USER_MODERATION']) {
				$mailer->add_content('REGN_CONTENT1');
				$mailer->add_content('REGN_CONTENT2',array('MANAGE_URL' => "{$config['FULL_URL']}/admin/membermanage.php?returntab=1"),true);
			}
			else {
				$mailer->add_content('REGN_CONTENT3');
			}
			$mailer -> ubbt_mail($adminemail);
		}

And in the language file "languages\english\verifyemail.php":
Code
$ubbt_lang['NEWREGBODY'] = "Hello,\n\nA new user has registered at %%BOARD_TITLE%%. Here are the details of the user's profile:\n\n Email Address: %%EMAIL_ADDY%%\n Display Name: %%DISPLAY_NAME%%\n IP Address: %%IP_ADDY%%\n\nTo view the entire profile or approve this account, please visit:\n\n%%MANAGE_URL%%";


You'd have to adapt the code accordingly to suit your needs.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 811
old hand
old hand
Joined: Jun 2006
Posts: 811
Thanks.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
3 members (mmem700, 2 invisible), 569 guests, and 117 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)