#487 Addressbook permissions

v2.15
closed
None
5
2012-09-17
2006-07-11
Danila Ulyanov
No

Create addressbook, open it up, go to write
permissions, try to add group, get an error:

Database error: Invalid SQL: SELECT
groups.*,users.username FROM groups, users INNER JOIN
users_groups ON groups.id=users_groups.group_id AND
users_groups.user_id='3' WHERE groups.user_id =
users.id ORDER BY groups.id ASC
MySQL Error: 1054 (Unknown column 'groups.id' in 'on
clause')
Session halted.

Switching the order of groups and users seems to fix it.

classes/base/sql.groups.class.inc line 278

change from
$sql = "SELECT groups.,users.username FROM groups,
users ";
to
$sql = "SELECT groups.
,users.username FROM users,
groups ";

Discussion

  • Danila Ulyanov
    Danila Ulyanov
    2006-07-11

    Logged In: YES
    user_id=1198484

    Actually this seems to affect not only the addressbook, but
    other group permissions as well for calendar, etc.

    And I am using mysql 5.0.22 in case this is version specific.