Joomla 1.5 stop user registration emails (virtuemart installed!)

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Apr 21, 2009 12:36 am

Joomla 1.5 stop user registration emails (virtuemart installed!)

Post by sologretto » Sun Jun 16, 2019 12:48 am

I have a legacy website that started having tons of spam user registrations from some jerkoff's script. Googling "disable user registration email joomla 1.5" brought up an excellent discussion: viewtopic.php?t=280282

Unfortunately that discussion was locked with a lot of people saying "THIS ISN'T WORKING FOR ME" and no answers given.

Lots of GREP time later I figured out what these people were likely missing. If they had installed Virtuemart the registration email was being sent by a different file:


If you search for PHPSHOP_USER_SEND_REGISTRATION_DETAILS you'll see a whole chunk of code. Comment the code out like I did to stop the user registration emails.

Code: Select all

$message = sprintf ($VM_LANG->_('PHPSHOP_USER_SEND_REGISTRATION_DETAILS',false), $name, $mosConfig_sitename, $mosConfig_live_site, $username, $pwd);

                $message = vmHtmlEntityDecode($message, ENT_QUOTES);
                // Send email to user
                if ($mosConfig_mailfrom != "" && $mosConfig_fromname != "") {
                        $adminName2 = $mosConfig_fromname;
                        $adminEmail2 = $mosConfig_mailfrom;
                } else {
                        $query = "SELECT name, email"
                        . "\n FROM #__users"
                        . "\n WHERE LOWER( usertype ) = 'superadministrator'"
                        . "\n OR LOWER( usertype ) = 'super administrator'"
                        $database->setQuery( $query );
                        $rows = $database->loadObjectList();
                        $row2                   = $rows[0];
                        $adminName2     = $row2->name;
                        $adminEmail2    = $row2->email;
                if( VM_REGISTRATION_TYPE != 'NO_REGISTRATION' || (VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION' && !empty($d['register_account']))) {
//                      vmMail($adminEmail2, $adminName2, $email, $subject, $message);

                // Send notification to all administrators
                $subject2 = sprintf ($VM_LANG->_('SEND_SUB',false), $name, $mosConfig_sitename);
                $message2 = sprintf ($VM_LANG->_('ASEND_MSG',false), $adminName2, $mosConfig_sitename, $name, $email, $username);
                $subject2 = vmHtmlEntityDecode($subject2, ENT_QUOTES);
                $message2 = vmHtmlEntityDecode($message2, ENT_QUOTES);

                // get superadministrators id
                $admins = $acl->get_group_objects( 25, 'ARO' );
                if( empty( $admins['users'] )) {
                foreach ( $admins['users'] AS $id ) {
                        $query = "SELECT email, sendEmail"
                        . "\n FROM #__users"
                        ."\n WHERE id = $id"
                        $database->setQuery( $query );
                        $rows = $database->loadObjectList();

                        $row = $rows[0];

                        if ($row->sendEmail) {
//                              vmMail($adminEmail2, $adminName2, $row->email, $subject2, $message2);
As you'll see all I did was comment out the vmMail lines which stop the messages from being sent.

Thanks to the Joomla team for awesome work and supporting us users as much as you do! :-)


Return to “Administration 1.5”