engelsystem/includes/model/UserGroups_model.php

17 lines
340 B
PHP
Raw Normal View History

2014-08-23 01:55:18 +02:00
<?php
/**
* Returns users groups
* @param User $user
*/
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`
");
}
?>