Skip to content

Commit f7190f2

Browse files
Update checking for users with zero groups AND zero roles.js
1 parent 537839e commit f7190f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Server-Side Components/Background Scripts/User with no roles and groups/checking for users with zero groups AND zero roles.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ while(userRecord.next()) {
1414
userRoles.query();
1515

1616
if(!userGroups.hasNext() && !userRoles.hasNext()) {
17-
orphanedUsers.push(userRecord.user_name.toString());
17+
// Using getValue() instead of direct field access
18+
orphanedUsers.push(userRecord.getValue('user_name'));
1819
}
1920
}
2021

2122
gs.print('Orphaned Users: ' + orphanedUsers.join(', '));
23+

0 commit comments

Comments
 (0)