User account already exists

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

User account already exists

Post by 2600 »

I was testing something in my test site and I needed to create a user to do so. I used the username of test, but the forum told me the username already exists. I looked in the database under phpbb_users and that name did not exist.

Any ideas?

phpBB 3.2.3
PHP 7.1
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: User account already exists

Post by stevemaury »

Run this SQL and post a screenshot of the output:

Code: Select all

SELECT * FROM phpbb_users WHERE username_clean = 'test'
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: User account already exists

Post by 2600 »

Welp, it says,
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0008 seconds.)
The odd thing is that it doesn't happen on my other board. I'm wondering if an extension is to blame, but then again, surely a table would exist of a test username.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: User account already exists

Post by 2600 »

Well, I disabled all extensions and I still can't create an username of test. Very odd.

Then again, I didn't delete all extensions' data either.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: User account already exists

Post by david63 »

Just a thought - you haven't by any chance set "test" as a banned username have you?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: User account already exists

Post by EA117 »

Do you have a group by that name on the one board? Looking at the places USERNAME_TAKEN_USERNAME will be returned ("The username you entered is already in use, please select an alternative"), it's not just checking for uniqueness in the user table; it's checking against the group name table as well. I guess those two types have to play in the same namespace.

The other question is whether it is specifically the "The username you entered is already in use, please select an alternative" message being reported. Versus "The entered email address is already in use", which could be due to your test email address already being assigned to another account on one of the boards, and/or only one of the boards having "Allow email address re-use" set to "No".
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: User account already exists

Post by GanstaZ »

This is one of those situations, where one needs to realize, that testing should be done on a local testing/development environment.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
warmweer
Jr. Extension Validator
Posts: 11197
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: User account already exists

Post by warmweer »

GanstaZ wrote: Mon Oct 15, 2018 2:41 pm This is one of those situations, where one needs to realize, that testing should be done on a local testing/development environment.
And since personal webservers are free (at least many of them are) and they are easily configurable (php-version, MySQl version, addons), it's THE way to test all changes beforehand.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: User account already exists

Post by 2600 »

EA117 wrote: Mon Oct 15, 2018 11:50 am Do you have a group by that name on the one board?
This was EXACTLY what the issue was. I had a defined user group called test and apparently that also affects username choice as well. Perhaps phpBB should change that?

You the man! :mrgreen:

As to this test account the last two posters are talking about. I said I was indeed using a test account in my OP. It's another domain on my host that is a clone of my board. I have added a HTTP password to its index to mitigate search engines from grabbing it. So far so good. I also denied search engine access with permissions just in case, but all traffic gets a 401 and it looks like Google has given up on my test site.

I created this test site right before updating to 3.2.3 for testing.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: User account already exists

Post by EA117 »

John connor wrote: Tue Oct 16, 2018 4:20 am I had a defined user group called test and apparently that also affects username choice as well. Perhaps phpBB should change that?
I can't think of a scenario off-hand to where "it would be ambiguous whether we're referring to names of groups or names of users", such that the two "must" share the same namespace / not allow duplicates between the two. But I'm guessing some scenario like that must exist, as to why the code would have been added to explicitly test for uniqueness across both tables.

At minimum maybe the "user already exists" error could be exchanged for a more specific message in this case, so that it's not misleading folks to look for a user account of that same name. It could have just as easily been a "already exists as a group name" message instead.
User avatar
AmigoJack
Registered User
Posts: 6106
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: User account already exists

Post by AmigoJack »

John connor wrote: Tue Oct 16, 2018 4:20 amPerhaps phpBB should change that?
EA117 wrote: Tue Oct 16, 2018 5:14 amI can't think of a scenario off-hand to where "it would be ambiguous whether we're referring to names of groups or names of users", such that the two "must" share the same namespace / not allow duplicates between the two. But I'm guessing some scenario like that must exist, as to why the code would have been added to explicitly test for uniqueness across both tables.
Private message senders. Upon addressing recipients you enter usernames and click on group names, but when reading a PM (no matter if you're the sender or one of the recipients) the names being listed in one style.

But then again one has to ask oneself how often you'd need the same name for both a user and a group.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: User account already exists

Post by EA117 »

AmigoJack wrote: Tue Oct 16, 2018 7:33 am But then again one has to ask oneself how often you'd need the same name for both a user and a group.
I would have to agree that it doesn't seem defensible that we "need" to be able to make group names the same as user names. The real situation is "its not expected that a user name would collide with a group name", or vice-versa, since both types allow arbitrary names to be defined. Accurate and appropriate error messages sounds like the efficient solution.

Interestingly, 3.2.2 does allow me to create a group with the same name as an existing user. Meaning this "uniqueness across both tables" check doesn't currently work both ways... https://tracker.phpbb.com/browse/PHPBB3-15843
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: User account already exists

Post by 2600 »

Voted and watching.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
Post Reply

Return to “[3.2.x] Support Forum”