Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
[SOLVED] New messages are sent to all users (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: [SOLVED] New messages are sent to all users
#47363
[SOLVED] New messages are sent to all users 6 Months, 3 Weeks ago  
I am running Fireboard 1.04 with Community Builder. I recently changed the configuration of Fireboard (security):
- Email Moderators: No
- Email Administrators: Yes

With this configuration new posts were sent to every user which opted to receive moderator emails (field sendEmail=1 in table jos_users) and not only the administrators!

I quickly turned off the Email Administrator option and analyzed the code.

The following code change is needed to fix this issue:
Filename: post.php (components/com_fireboard/template/default)
Lines: 350 ff

Old code:
[code:1]if($fbConfig['mailadmin']==1) {
if(strlen($sql2)) { $sql2 .= "n OR "; }
$sql2 .= " u.sendEmail=1";
}[/code:1]


New code:
[code:1]
if($fbConfig['mailadmin']==1) {
if(strlen($sql2)) { $sql2 .= "n OR "; }
$sql2 .= " u.gid >= 24 AND u.sendEmail=1";
}
[/code:1]

This solved my issue

Stephan
schoenbi (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/03/19 15:42 By schoenbi.
 
The administrator has disabled public write access.  
#47678
Re:[SOLVED] New messages are sent to all users 6 Months, 3 Weeks ago  
Thanks for this!!!

ALL my users are also getting moderator emails.

Could you please tell me what this 'u.gid >= 24 AND' is doing?

-Tom
tlombard (User)
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#47685
Re:[SOLVED] New messages are sent to all users 6 Months, 3 Weeks ago  
Every user in Joomla belongs to a specifc group; this is specified in the table jos_users. The available groups are defined in the table jos_core_acl_aro_groups:

A default Joomla 1.5 installation always contains the groups (extract from the table):
[code:1]
| id | parent_id | name | lft | rgt | value |
| 24 | 23 | Administrator | 15 | 18 | Administrator |
| 25 | 24 | Super Administrator | 16 | 17 | Super Administrator |
[/code:1]

So the u.gid >=24 is referring to all users which belong to the group with an ID of 24 or higher, which in standard cases would be the Administrators and the Super Administrators.

Stephan
schoenbi (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top