engelsystem/includes/model/UserGroups_model.php

17 lines
342 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`
2014-12-28 13:44:56 +01:00
WHERE `UserGroups`.`uid`='" . sql_escape($user['UID']) . "'
2014-08-23 01:55:18 +02:00
ORDER BY `UserGroups`.`group_id`
");
}
?>