[#4702] Cannot select Admins as recipients

Created By: Georg Busch (nan)
Date Submitted: Fri Mar 19 18:56:37 -0400 2010

Assigned To: Morten Poulsen (silmarillion)
Version: 0.1.1
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Cannot select Admins as recipients
Detailed Description:
I have several users that are admins (3 Users that belongs to the group admin;
so they should have all permissions).
But when selecting the InterComm module in tab "Compose" there are no users in
the "Send To" dropdown. It seems to be that i'm the only admin. But this is
definitly not the case.
Even the "Superadmin" (the account that installed CMSms) is not visible in the
So i actually cannot send anything.

(CMSms 1.6.7; InterComm 0.1.1)

In brief: The Module is completely useless since admins cannot communicate with
admins and non admins cannot reply to admins.
But it sounds pretty ... if it would work   :-\

This has something to do with how the module loads the permissions.
So the problem ist the function LoadPermissions() of InterComm.module.php.
There it searches for the permission "accessintercomm" in a linked table (users,
user_groups, group_perms and permissions).
Since something has changed some while ago with the permissions of backend users
that are admins this does not work for admins but only for users that are NOT
assigned to an admingroup but has the permission "accessintercomm".

E.g. since the admin group has always all permissions there is no need to list
the group permissions of the admin group in the database table.
The admin group is the first group that is created when CMSms is installed. So
it has the ID 1. CMSms defines if a user has full backend access by just
checking for this group ID or (if not 1) if there are any permissions found in
the group_perms table that belongs to the users group. So even if you never
touched the permissions - or if there are no group permissions found - you will
have full backend acces as long as you belong to the admin group that has been
created during installation.

That means if you just want to communicate with admins only, this module is
useless due to its LoadParmissions function since it loads the permissions
wihtout checking the group ID but only refers to what can be found in the
group_perms table. And there are no admin permissions.
And that also means that non admins with permission "accessintercomm" cannot
reply to admins since the admins will never be listed in the "Send To" dropdown.

I hope you understand what i mean. 
Apologies for any language issues but english is not my native language.

Since i'm a very impatient person i already fixed this and the errormessages
that appears when viewing a recieved message.
So it works fine now :)

You can download the svn diff file from here:

and the modified file InterComm.module.php from here: