Skip to content

A free open source IT asset/license management system

Fixes #3873 - show groups correctly on user listing page

snipe15bb30acd6c7
diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php
index ecc9f57e86..2f8825adf2 100755
--- a/resources/views/users/index.blade.php
+++ b/resources/views/users/index.blade.php
@@ -89,11 +89,15 @@
<script>
function groupsFormatter(value) {
- var groups = '';
- for (var index = 0; index < value.length; index++) {
- groups += '<a href="#" class="label label-default"> ' + value[index].name + '</a> ';
+
+ if (value) {
+ var groups = '';
+ for (var index in value.rows) {
+ groups += '<a href="#" class="label label-default"> ' + value.rows[index].name + '</a> ';
+ }
+ return groups;
}
- return groups;
+
}