Hiya, I have an array of existing users (tp!ListofUsersUpdated) which

Hiya,

I have an array of existing users (tp!ListofUsersUpdated) which is generated form the updatedUsers output from LDAP sync.

This array needs to be modified to remove members of a certain group ("SMT Users") before the remainder are added to a group.
How would I accomplish ? I have tried reject() and remove() but get hit with errors every time.

Help!...

OriginalPostID-93333

OriginalPostID-93333

  Discussion posts and replies are publicly visible

Parents
  • The users that you want to remove from the array, are they members of the "SMT Users" group at the moment you want to remove them from that updatedUsers array from LDAP sync? If so, couldn't you do a getdistinctusers() on the "SMT Users" group. Then do a symmetricDifference() with the output of the distinct users of that group and the updatedUsers array. The output of the symmetricDifference() should remove all the users that exist in both arrays (group and ldap).
Reply
  • The users that you want to remove from the array, are they members of the "SMT Users" group at the moment you want to remove them from that updatedUsers array from LDAP sync? If so, couldn't you do a getdistinctusers() on the "SMT Users" group. Then do a symmetricDifference() with the output of the distinct users of that group and the updatedUsers array. The output of the symmetricDifference() should remove all the users that exist in both arrays (group and ldap).
Children
No Data