engelsystem/includes/model/UserGroups_model.php

18 lines
344 B
PHP
Raw Normal View History

2014-08-23 01:55:18 +02:00
<?php
/**
* Returns users groups
2017-01-02 15:43:36 +01:00
*
2014-08-23 01:55:18 +02:00
* @param User $user
*/
2017-01-02 03:57:23 +01:00
function User_groups($user)
{
return sql_select("
2014-08-23 01:55:18 +02:00
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`
");
}