Specify7 Login error for one user

Thank you for the quick response!

Thankfully, resolving this issue should not cause any problems with Specify 6.

I can see both have the same email address, is that how they are attached to each other?

Besides directly using SQL in the database to set the relationship, I am unsure how the application can be used to associate multiple agents to one Specifyuser. It does not seem possible in recent versions of Specify 7, and further investigation will be performed to determine if it is possible in earlier versions of Specify 7 and Specify 6.

Also, It appears the two Agent records referencing the Specifyuser might be duplicates if they have the same email and the same name.
Can confirm that these two Agent records are duplicates and meant to reference the same person? Or are these two Agent records meant to be distinct and separate?

If these Agent records are duplicates and you are using Specify v7.9.0 or later, you can utilize the Record Merging tool to merge them into a single Agent record.

Regardless, the solution will be to disconnect one of the Agents from the Specifyuser.

Through Specify7, this can be done through the Security and Accounts Panel by unsetting and then resetting the Agent on the Specifyuser.

Below is an attached video following my example from before.
I have decided that the Specifyuser User B should be associated with Agent B

After saving the Specifyuser, the error should no longer occur whenever the affected Specifyuser logs in.

If you are unsure which Agent to use, I would recommend querying on the Audit Log table and comparing the entries of each Agent.
The audit log can be queried by navigating to http://<DOMAIN>/specify/query/new/spauditlog/ and constructing a query like the one below.

I would suggest the Agent that has a greater presence in the database be selected.

Technically, the purpose of the assigning an Agent to a Specifyuser is to record the ModifiedByAgent and CreatedByAgent for every record as the User creates/updates/deletes records.
If there are two Agents assigned to a single Specifyuser, then Specify would not know which Agent to put down as having Modified or Created the records.

Let me know if you have any further questions.