Hi RLShare,
Thats really appreciated. Thank you.
Regarding checking if UserID is set to 0, is that an additional piece of code I will need, or an alteration of this code?
PHP Code:
$username = $db->query_first("
SELECT useractivation.userid, username
FROM useractivation
LEFT JOIN user ON (useractivation.userid = user.userid)
WHERE activationid = '" . $db->escape_string($vbulletin->GPC['i']) . "'
AND emailchange=0;
");
$subjectname = $vbulletin->userinfo['username'] != '' ? $vbulletin->userinfo['username'] : $username['username'];