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
John connor
Registered User
Posts: 1792
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

User account already exists

Post by John connor » Sat Oct 13, 2018 8:31 pm

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

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49643
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: User account already exists

Post by stevemaury » Sat Oct 13, 2018 9:02 pm

Run this SQL and post a screenshot of the output:

Code: Select all

SELECT * FROM phpbb_users WHERE username_clean = 'test'
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

User avatar
John connor
Registered User
Posts: 1792
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: User account already exists

Post by John connor » Sat Oct 13, 2018 10:17 pm

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.

User avatar
John connor
Registered User
Posts: 1792
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: User account already exists

Post by John connor » Mon Oct 15, 2018 6:56 am

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.

User avatar
david63
Jr. Extension Validator
Posts: 14916
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: User account already exists

Post by david63 » Mon Oct 15, 2018 7:12 am

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
EA117
Registered User
Posts: 88
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: User account already exists

Post by EA117 » Mon Oct 15, 2018 11:50 am

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: 566
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: User account already exists

Post by GanstaZ » 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.
"When answer lies in the question,.. question becomes redundant!"

User avatar
warmweer
Registered User
Posts: 1251
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: User account already exists

Post by warmweer » Mon Oct 15, 2018 3:00 pm

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.
A bug is a feature that hasn't made it to the manual (yet)

User avatar
John connor
Registered User
Posts: 1792
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: User account already exists

Post by John connor » Tue Oct 16, 2018 4:20 am

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.

User avatar
EA117
Registered User
Posts: 88
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: User account already exists

Post by EA117 » Tue Oct 16, 2018 5:14 am

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: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: User account already exists

Post by AmigoJack » Tue Oct 16, 2018 7:33 am

John connor wrote:
Tue Oct 16, 2018 4:20 am
Perhaps phpBB should change that?
EA117 wrote:
Tue Oct 16, 2018 5:14 am
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.
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 worst thing about censorship is ███████████

User avatar
EA117
Registered User
Posts: 88
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: User account already exists

Post by EA117 » Tue Oct 16, 2018 11:43 am

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
John connor
Registered User
Posts: 1792
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: User account already exists

Post by John connor » Wed Oct 17, 2018 4:38 am

Voted and watching.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: Blitze, bonelifer, Tom84, Toxyy and 32 guests