Cannot update user because "username is already in use"
-
I created a new user yesterday. Today, when I tried to save new permissions or a new password, after clicking the save (disk) icon, I receive the error message "username is already in use." The changes were not saved.
-
Are you using a password manager browser extension by chance? We have noticed they have a tendency to change the username field when you are editing users.
-
I'm not using a password manager. I'm using Firefox 56 on Linux, and have not installed any new plugins since the last time this was working.
core 2.8.8 build 635 - paid
-
Actually, the Firefox instance I'm running contains no user-installed plugins. It contains only a "safe browsing" plugin issued by Firefox by default.
-
Hi Pedro,
If the issue continues every time you are using the users page, and the user isn't appearing in the list, I would expect you created two the first time. There is an outstanding issue: https://github.com/infiniteautomation/ma-core-public/issues/1048 but it hasn't come up often so it seemed somewhat minor.
You can easily fix it on the /sqlConsole.shtm page by
SELECT * FROM users ORDER BY id DESC LIMIT 10;
and then delete all but one of any duplicate entry. I am supposing that because you just created that user there aren't account details associated with it since it probably didn't ever work. Nevertheless, you probably want to retain the account with the lower id.
DELETE FROM users WHERE id IN (123,456,789);
-
Hi Phillip,
Thanks for the SQL. The query response did not reveal any duplicated usernames, even after I increased the query limit. I was able to change the permissions on other users, indicating that the problem likely pertains only to this user. Other than being the only user created since upgrading from core 2.8.6 to core 2.8.8, I'm not aware of any other characteristics that would make this user unique.
-
Is it possible you simply didn't hit the new user plus button / select the user from the list, and instead changed the username?
-
I definitely picked the user from the list. I did not hit the new user plus button because the user already existed.
-
Is its ID in the users table -1 somehow?
-
@phildunlap No: user id = 53. The blank fields for that user are homeUrl and timezone. All other fields are filled in.