@dig814
Copy the following in to /administrator/language/en-GB/en-GB.ini & /language/en-GB/en-GB.ini. You need both just in case you ever create a user from the admin panel.
USERNAME_REMINDER_EMAIL_TITLE=Your %s username
RESEND_ACTIVATION_EMAIL_TEXT=Hello,<br /><br />An activation link has been requested for your %s account.<br /><br />To activate to your account, click on the link below.<br /><br />%s<br /><br />Thank you.
Then, create a new file called a.php in /administrator/components/com_netinvoice/events/user_created/
<?php
// GET ALL THE FILES WE NEED
jimport('joomla.user.helper');
jimport('joomla.application.component.model');
jimport('joomla.mail.helper');
// CONNECT TO THE DATABASE AND BLOCK THE NEW USER
$db =& JFactory::getDBO();
$query = "UPDATE #__users SET block = '1' WHERE id = '$params[id]';";
$db->setQuery($query);
$db->query();
// GENERATE A NEW ACTIVATION KEY & REMOVE THE LAST VISIT DATE
$activation = JUtility::getHash(JUserHelper::genRandomPassword());
$query = "UPDATE #__users SET activation = '$activation', lastvisitDate = '0000-00-00 00:00:00' WHERE id = '$params[id]';";
$db->setQuery($query);
$db->query();
// SEND THE USER AN EMAIL WITH THE ACTIVATION LINK
$config = &JFactory::getConfig();
$uri = &JFactory::getURI();
$url = $uri->toString( array('scheme', 'host', 'port')).JRoute::_('index.php?option=com_user&view=login', false);
$from = $config->getValue('mailfrom');
$fromname = $config->getValue('fromname');
$subject = JText::sprintf('USERNAME_REMINDER_EMAIL_TITLE', $config->getValue('sitename'));
$link = $uri->toString( array('scheme', 'host', 'port')).JRoute::_('/index.php?option=com_user&task=activate&activation='.$activation, false);
$link = '<a href="'.$link.'">'.$link.'</a>';
$body = JText::sprintf('RESEND_ACTIVATION_EMAIL_TEXT', $config->getValue('sitename'),$link);
if (!JUtility::sendMail($from, $fromname, $params[email], $subject, $body, 1))
{
return false;
}
?>
Try that! It might need a bit of cleaning up but it will do the job.