The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.



Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Fri Oct 28, 2011 7:04 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
I have a problem: Super User is not receiving notification emails when a new user is registering.

My configuration is as follows:

- Joomla version: 1.7.0.
- Super User Profile > Receive System emails: Yes
- Users Manager Options (Users Configuration) > New User Account Activation: Self
- Global Configuration > Server > Mail Settings > Mailer: PHP Mail

1. When a new user is registered Super User is not notified by email, but the new user receives the activation email and the registration works properly. The only problem is that Super User is not aware of the fact that a new user has registered because he doesn’t receive any email.

2. If I change "New User Account Activation" from "self" to "Admin", when a new user is registering the Super User receives a notification email with the activation link of the new user.

3. When a user sends a contact form, the Super User receives the email properly.

I don't think that is a problem of mail settings because in point 2 and 3 the Super User is receiving emails from the webpage.

Can anybody help me to fix this problem?

Thank you for your attention.


Top
 Profile  
 
PostPosted: Fri Oct 28, 2011 7:25 pm 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 25381
Location: @Webdongle
With 1.7 there are no system emails when 'New User Account Activation: Self'. The Admin only gets an email when 'New User Account Activation: Admin'. Then the admin can chose to Activate the account or not.

_________________
'When I'm right nobody remembers when I'm wrong nobody forgets.'

http://weblinksonline.co.uk/joomla-faq.html
http://www.weblinksonline.co.uk/updating-joomla.html


Top
 Profile  
 
PostPosted: Fri Oct 28, 2011 8:22 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
Thank your for your help, I didn't know that there are no system emails with 'New User Account Activation: Self' on joomla 1.7.0.
I think it could be a good idea for new releases of joomla to give the possibility to receive systems emails also with this user activation option !!
Regards,


Top
 Profile  
 
PostPosted: Fri Oct 28, 2011 8:32 pm 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 25381
Location: @Webdongle
http://joomlacode.org/gf/project/joomla ... m_id=26206

_________________
'When I'm right nobody remembers when I'm wrong nobody forgets.'

http://weblinksonline.co.uk/joomla-faq.html
http://www.weblinksonline.co.uk/updating-joomla.html


Top
 Profile  
 
PostPosted: Thu Nov 10, 2011 10:49 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu May 01, 2008 5:16 am
Posts: 14
I have modified my J1.7.2 so that it will send the SuperAdmins with "Receive system emails" enabled when users activate their account.

Find the following code in components/com_users/models/registration.php (about line 155)
Code:
        else
        {
            $user->set('activation', '');
            $user->set('block', '0');
and add the following into the "else".
Code:
            // Send email to admins
            $uri = JURI::getInstance();
            jimport('joomla.user.helper');
            // Compile the admin notification mail values.
            $data = $user->getProperties();
            $data['activation'] = JUtility::getHash(JUserHelper::genRandomPassword());
            //$user->set('activation', $data['activation']);
            $data['siteurl']    = JUri::base();
            $base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
            $data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);
            $data['fromname'] = $config->get('fromname');
            $data['fromname'] = $config->get('fromname');
            $data['mailfrom'] = $config->get('mailfrom');
            $data['sitename'] = $config->get('sitename');
            //$user->setParam('activate', 1);
            $emailSubject   = JText::sprintf(
                'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_SUBJECT',
                $data['name'],
                $data['sitename']
            );

            $emailBody = JText::sprintf(
                'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY',
                $data['sitename'],
                $data['name'],
                $data['email'],
                $data['username'],
                $data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation']
            );

            // get all admin users
            $query = 'SELECT name, email, sendEmail' .
                        ' FROM #__users' .
                        ' WHERE sendEmail=1';

            $db->setQuery( $query );
            $rows = $db->loadObjectList();

            // Send mail to all superadministrators id
            foreach( $rows as $row )
            {
                $return = JUtility::sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBody);

                // Check for an error.
                if ($return !== true) {
                    $this->setError(JText::_('COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));
                    return false;
                }
            }
to
The admins will receive the same email as if activation is set to "admin", you just don't need to actually do the activation.

The code that is inserted is borrowed from the "admin" section. If you want to be fancy, you can change the strings sent in the email.


Top
 Profile  
 
PostPosted: Thu Nov 10, 2011 11:12 pm 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 25381
Location: @Webdongle
Could you create a diff patch for http://joomlacode.org/gf/project/joomla ... m_id=26206 see what everyone has to say ?

_________________
'When I'm right nobody remembers when I'm wrong nobody forgets.'

http://weblinksonline.co.uk/joomla-faq.html
http://www.weblinksonline.co.uk/updating-joomla.html


Top
 Profile  
 
PostPosted: Fri Nov 11, 2011 1:51 am 
Joomla! Intern
Joomla! Intern

Joined: Sat Dec 04, 2010 6:57 pm
Posts: 62
I totally agree with you. We should receive email notification 'cos new registrant could be a bad spammer. Hope the Joomla Developer team will look into it.

Regards,

publimedia01 wrote:
Thank your for your help, I didn't know that there are no system emails with 'New User Account Activation: Self' on joomla 1.7.0.
I think it could be a good idea for new releases of joomla to give the possibility to receive systems emails also with this user activation option !!
Regards,


Top
 Profile  
 
PostPosted: Fri Nov 11, 2011 2:48 am 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 25381
Location: @Webdongle
pearlcaviar wrote:
.... Hope the Joomla Developer team will look into it.
...

If kennywickstrom creates a diff patch then it can be put on http://joomlacode.org/gf/project/joomla ... m_id=26206 for testing. The Dev's could decide if they want to use it then.

_________________
'When I'm right nobody remembers when I'm wrong nobody forgets.'

http://weblinksonline.co.uk/joomla-faq.html
http://www.weblinksonline.co.uk/updating-joomla.html


Top
 Profile  
 
PostPosted: Fri Nov 11, 2011 4:13 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu May 01, 2008 5:16 am
Posts: 14
I have created a new item (http://joomlacode.org/gf/project/joomla ... m_id=27144) since the issue mention previously is closed. I attached a patch to the new issue.

This patch does not really change the email message being sent since that required new language entries.


Top
 Profile  
 
PostPosted: Fri Nov 11, 2011 12:50 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
Thank you 'kennywickstrom' for your solution code.

I really hope that joomla developpers team will make this function available in new releases.
There are plenty of ideas around the forum for a better joomla release.

I have personally been working to find some solutions to one of the joomla problems concerning the articles loaded on a Category List and the SEF urls utilization. When you are reading an article which is located on a Category List of a website that is using SEF urls, an you decide to login, you will be returned to a blank page (or an error page if you have installed JCE editor), and not to the article you was reading. I have treated this problem and encourage developpers to find a solution for future releases. For more information read: http://forum.joomla.org/viewtopic.php?f=616&t=672782


Top
 Profile  
 
PostPosted: Fri Nov 11, 2011 7:08 pm 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 25381
Location: @Webdongle
kennywickstrom wrote:
I have created a new item (http://joomlacode.org/gf/project/joomla ... m_id=27144) since the issue mention previously is closed. I attached a patch to the new issue.
....

The other Tracker is still open, but I've set your Tracker as 'Pending' with a note on the original Tracker to the one you created. (It's too complicated an issue for me to test as I don't understand if using the code like that is the best way to achieve it. So will wait to see what the Dev's say).

Thanks for your effort, lets hope they approve.

_________________
'When I'm right nobody remembers when I'm wrong nobody forgets.'

http://weblinksonline.co.uk/joomla-faq.html
http://www.weblinksonline.co.uk/updating-joomla.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 



Who is online

Users browsing this forum: No registered users and 43 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group