From 05e7c423aa23c9f42328ccadabe999383257f8ad Mon Sep 17 00:00:00 2001 From: Nikolai R Kristiansen Date: Thu, 9 Jul 2015 23:51:29 +0200 Subject: [PATCH] Fixes notice on users with no groups --- api/user.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/user.php b/api/user.php index 8debecd..1eb6772 100644 --- a/api/user.php +++ b/api/user.php @@ -159,6 +159,9 @@ $results = array(); foreach($res as $result) { foreach($result as $key => $value) { if($key == "groups") { + if($value === "") { + continue; // no groups + } $u_gs = array(); $u_groups = explode(",",$value); foreach($u_groups as $g) {