problem with security groups

We have been experiencing some strange security behaviour lately which was highlighted by add a new user and looking at the data that was transferred by RIVA to his Exchange account., Further investigation showed that when you logged in as this user, you saw Leads that you should not see as the security is configured to show you only the Leads that are owned by members of his security group. The security group is called I04 and contains 18 users including a user that is also called I04. BUT when you open Security Groups management/I04 it shows 214 members!!!.

18 rows of this table are the correct members but the user I04 is repeated 196 times.

Examination of the other security groups associated with sales territories show the same effect to a lesser or greater extent.

If you open the database in a tool like Navicat, you can examine the securitygroups_users table and see the excessive rows very clearly. I have attached a screenshot showing the effect for a short length of the table. Note that each of the 196 rows in the table for user I04 has a unique entry in the id field of this table.

Now this leads to several questions.

  1. Has anyone else faced this problem?
  2. Can I delete the extraneous rows without damaging the rest of the relationships in the database or will that break the SuiteCRM system?
  3. Which of the 196 rows for I04 should I keep or doesn’t it matter?
  4. What brought this about?

Further to this I have just checked my SuiteCRM user table with Navicat and found that for each user of the form IXX (where XX is 01 to 13 i.e. the sales territory of the sales rep) there are two rows. One row looks fine and has a complex id field entry but the second has IXX as the id entry which is surely incorrect… see attached screenshot.

Sounds like a workflow or the RIVA integration is triggering users to be added to groups. Something funny is going on there. This hasn’t ever been reported before so I would start there and try to recreate the issue.