diff --git a/webui/user-main.php b/webui/user-main.php
index 3d2a6d246c04da68a2cd38a32a5adf9abe4d199d..54972faea397ad7413f3d59aa559ec72b426e670 100644
--- a/webui/user-main.php
+++ b/webui/user-main.php
@@ -74,17 +74,31 @@ if (!isset($_POST['frmaction']))
 			$sql = "SELECT ID, Username, Disabled FROM ${DB_TABLE_PREFIX}users ORDER BY ID ASC";
 			$res = $db->query($sql);
 
+			$rownums = 0;
 			# List users
 			while ($row = $res->fetchObject()) {
+				if ($row->id != NULL) {
+					$rownums = $rownums + 1;
+				} else {
+					$rownums = $rownums - 1;
+				}
 ?>
-				<tr class="resultsitem">
-					<td><input type="radio" name="user_id" value="<?php echo $row->id ?>"/><?php echo $row->id ?></td>
-					<td><?php echo $row->username ?></td>
-					<td class="textcenter"><?php echo $row->disabled ? 'yes' : 'no' ?></td>
-				</tr>
+					<tr class="resultsitem">
+						<td><input type="radio" name="user_id" value="<?php echo $row->id ?>"/><?php echo $row->id ?></td>
+						<td><?php echo $row->username ?></td>
+						<td class="textcenter"><?php echo $row->disabled ? 'yes' : 'no' ?></td>
+					</tr>
 <?php
 			}
 			$res->closeCursor();
+			if ($rownums <= 0) {
+?>
+				<tr>
+					<td class="textcenter">Group list is empty</td>
+				</tr>
+<?php
+			}
+			unset($rownums);
 ?>
 		</table>
 	</form>