|
|
| Line 1: |
Line 1: |
| | [[Category:Tips and tricks]][[Category:Joomla! 1.5]] | | [[Category:Tips and tricks]][[Category:Joomla! 1.5]] |
| − | Joomla system notifies all users from the Super Administrator group when new users register on the web site.
| |
| − |
| |
| − | Suppose you want to notify all users from the administrator group instead of all users from the super administrator group. Joomla! does not provide a way to select the group who recieves the notifications.
| |
| − |
| |
| − | There is a small hack that needs to be done in the com_user component.
| |
| − |
| |
| − | 1. Open the folder <tt>components/com_user/</tt> and backup the original file <tt>controller.php</tt>
| |
| − |
| |
| − | 2. Open the file <tt>controller.php</tt> and find the following lines:
| |
| − |
| |
| − | <source lang="php">
| |
| − | <?php
| |
| − | //get all super administrator
| |
| − | $query = 'SELECT name, email, sendEmail' .
| |
| − | ' FROM #__users' .
| |
| − | ' WHERE LOWER( usertype ) = "super administrator"';
| |
| − | $db->setQuery( $query );
| |
| − | $rows = $db->loadObjectList();
| |
| − |
| |
| − | ?>
| |
| − | </source>
| |
| − |
| |
| − | 3. Just replace the query filter "super administrator" by "administrator" like this:
| |
| − |
| |
| − | <source lang="php">
| |
| − | <?php
| |
| − | //get all administrator
| |
| − | $query = 'SELECT name, email, sendEmail' .
| |
| − | ' FROM #__users' .
| |
| − | ' WHERE LOWER( usertype ) = "administrator"';
| |
| − | $db->setQuery( $query );
| |
| − | $rows = $db->loadObjectList();
| |
| − |
| |
| − | ?>
| |
| − | </source>
| |
| − |
| |
| − | 4. Save the changes.
| |
| − |
| |
| − | Now all users from the Administrator group that have the option '''Receive System E-mails''' set to '''Yes''' will be notified each time there is a new registration on your site.
| |