blob: c390cd207e73660fba3532992487c419892428be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<?php
/**
* Returns users groups
*
* @param array $user
* @return array|false
*/
function User_groups($user)
{
return sql_select('
SELECT `Groups`.*
FROM `UserGroups`
JOIN `Groups` ON `Groups`.`UID`=`UserGroups`.`group_id`
WHERE `UserGroups`.`uid`=\'' . sql_escape($user['UID']) . '\'
ORDER BY `UserGroups`.`group_id`
');
}
|