You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
engelsystem/includes/model/UserGroups_model.php

19 lines
370 B
PHTML

<?php
/**
* Returns users groups
8 years ago
*
* @param array $user
* @return array|false
*/
8 years ago
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`
');
}