Duplicate users

Ullar Unt shared this question 4 years ago
Completed

Hi,

Appeared question regarding users import through csv-file. There have been 1 user who was not able to log to system, when resetting the password, still problem. I checked the person table in Yellowfin database and somehow the same name user exist 4 times, for all status is active! It seems Yellowfin is confused because of it.

How is it possible that Yellowfin adds the same user additionally? Also, how to get rid off another lines and just leave 1 line per user? Can i just delete the lines in person table, but it could cause mess somewhere else?

I will be waiting for your reply.


Best regards,

Üllar Unt

Replies (6)

photo
1

Hi Ullar,


Thanks for reaching out. Do you have your CSV with the included user handy to see if I can replicate with your CSV and/or check the format? Can you also supply a screenshot of the output of the relevant portion of the Person table? I'd be curious to know whether the duplicated user has the same IpPerson value or not.


Regardless, the important thing is whether the user in question only has one value in the IpClass table, which should be the case. Password resets and login info is stored in the IpClass table so the first thing would be to check whether there are duplicates there. If there are two instances of the same login, say test@test.com with different IpId's, this is where the confusion would stem from, not the Person table.


Assuming there's only one IpClass result, if all 4 entries are of the same IpPerson value in the Person table, then you can delete 3 of the values indiscriminately.


If there are 4 different values though, say 12107, 12108, 12109 and 12110, you'll need to determine which is the one that's been being used this entire time. If the Person value being logged into is 12110 for example, you'll see results in most of these tables:

/51b752884db5cc627ddbf3030de04ea3

Basically, the 'reportinstance' table proves that 12110 has used the application before. You can see I'm even logged into that value right now (activesession) and that this value is a part of an access group (accessgroupflat).

If the account hasn't been used much, the results will only be found in the following tables:

/0c8d325230800d7781642fbb5aec5daa

Which of course means there may dupes in 5 more tables aside from Person.

Hopefully this all makes sense. Please let me know how goes.

Regards,

Mike

photo
1

Hi Ullar,

I just wanted to check in and see how things are going with this.

Regards,

Mike

photo
1

Hi Mike,

First of all - Happy New Year! Sorry for long reply, was out of office during holidays.

The thing is the duplicated user IpPerson value is different. When checked in the IpClass table, it gives only 2 values for IpId, one of them has EndDate passed already 2019-12-19, the other 9999-12-31.

Unfortunately i cannot share csv file and screenshots if this is not private ticket, however, for csv file i run the following query:


SELECT p.FirstName, p.LastName, p.MiddleInitial, p.SalutationCode, p.PreferredLanguageCode, p.LocalTimeZoneCode, c.emailAddress, i.EmailLeft, i.Password, s.RoleCode, pc.ConfigData, p.Status

FROM person p

INNER JOIN IpContact c ON p.IpPerson = c.IpID

INNER JOIN IpClass i ON p.IpPerson = i.IpID

INNER JOIN StaffMemberRole s ON p.IpPerson = s.IpEmployee

INNER JOIN iprltshp ir ON s.IpEmployee = ir.IpChild

INNER JOIN Organisation o ON ir.IpParent = o.IpOrg

INNER JOIN personconfiguration pc ON pc.IpPerson = p.IpPerson

WHERE i.enddate > NOW() AND s.enddate > NOW() AND pc.ConfigCode = "JOBTITLE" AND p.status = 'ACTIVE'


So, basically i need to check all the tables related to user and then delete duplicates for account hasn't been used much?

I will be waiting for your reply.


Best regards,

Üllar Unt

photo
1

Hi Ullar,

Happy New Year! That is correct. In terms of simply being able to login, you should be able to do so after deleting the second IpClass entry, presumably the one whose EndDate passed already. Then again, the one that already ended could be the one that was being logged into, since this behavior was reported after the 19th, so maybe the simplest thing would be to just change the EndDate to 9999-12-31 and the duplicate account may not be the issue at all. Let's start with changing that value instead, then restart YF and see if the user can then log in and let me know how goes. It

Regards,

Mike

photo
1

Hi Mike,

Thank you for reply. Yes, it seems to be working now. I didn't change the EndDate but removed all duplicates from previously mentioned tables. Thank you for support and could close the case.


Best regards,

Üllar

photo
1

Hi Ullar,

Thanks for getting back to me and providing the method used. Glad to hear this is now resolved. Please don't hesitate to reach out with any other questions or concerns.

Regards,

Mike

Leave a Comment
 
Attach a file