Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function getRoles($id, $opts = []){
  2. $db = DB::getInstance();
  3. $userQ = $db->query("SELECT * FROM user_permission_matches WHERE user_id = ?",array($id));
  4. $c = $userQ->count();
  5.  
  6. if($c > 0){
  7. $results = $userQ->results();
  8.  
  9. foreach ($results as $u){
  10. echoPerm($u->permission_id);
  11. $c = $c-1;
  12. if($c > 0){
  13. echo ", ";
  14. }
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement