Actions

Category

Difference between revisions of "Tips and tricks 1.5"

From Joomla! Documentation

 
(Change New User registration notification from Super Administrators to Administrators)
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.

Revision as of 06:28, 21 June 2009

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 components/com_user/ and backup the original file controller.php

2. Open the file controller.php and find the following lines:

<?php
                //get all super administrator
                $query = 'SELECT name, email, sendEmail' .
                                ' FROM #__users' .
                                ' WHERE LOWER( usertype ) = "super administrator"';
                $db->setQuery( $query );
                $rows = $db->loadObjectList();
 
?>

3. Just replace the query filter "super administrator" by "administrator" like this:

<?php
                //get all administrator
                $query = 'SELECT name, email, sendEmail' .
                                ' FROM #__users' .
                                ' WHERE LOWER( usertype ) = "administrator"';
                $db->setQuery( $query );
                $rows = $db->loadObjectList();
 
?>

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.

Pages in category ‘Tips and tricks 1.5’

The following 44 pages are in this category, out of 44 total.

A

C

D

F

G

H

H cont.

I

L

M

O

P

P cont.

R

S

U