Allow reuse of username

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Scam Warning
Post Reply
Tomtefar2
Registered User
Posts: 12
Joined: Thu Nov 13, 2014 6:20 pm

Allow reuse of username

Post by Tomtefar2 »

Hi,

I wonder if someone knows a way to modify my phpbb 3.1.1 board to allow the reuse of usernames (like the reuse feature in ACP for e-mail, which will not be used for obvious reasons)?

I will use the username field for "First name Last name" eg. "John Doe". For this reason I want to allow the same username to be used again. I am also trying to modify my board so users login with e-mail instead of username: viewtopic.php?f=466&t=2278006

Thank you!
Last edited by Oyabun1 on Tue Nov 25, 2014 9:02 am, edited 1 time in total.
Reason: Moved from 3.1.x Support forum
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: Allow reuse of username

Post by janus_zonstraal »

And what are you going to do with the post of the "old" username?
Sorry! My English is bat ;) !!!
Tomtefar2
Registered User
Posts: 12
Joined: Thu Nov 13, 2014 6:20 pm

Re: Allow reuse of username

Post by Tomtefar2 »

The board is not live yet so there are no users, for this reason there is no old username. Or do I understand you wrong? Do you mean when there is an existing user and a new one tries to register with the same name (and therefore username)? If that is the case this is the problem I need to solve. The unique key for the user should be email (and index in database) instead of username as it is currently.
User avatar
Wolfsblvt
Registered User
Posts: 634
Joined: Sun Oct 26, 2014 9:12 pm
Location: Solingen, Germany
Contact:

Re: Allow reuse of username

Post by Wolfsblvt »

An easy workaround for this, maybe:
Use the username field as email field. So users are in fact email adresses. Add profile fileds for first and last name. Modify template to show the profile fields instead of the username on each place where you want.

Username should be unique, otherwise it may lead to several uncontrollable errors.
If you have a specific extension request and you are willing to pay for, you can write me a PM.
My extensions (Trending: @Mention SystemAdvanced PollsUser Online Time)

»Du kamst zu uns. Deine Stimme kam. Du zeigtest uns die Sterne. Sie funkelten. Wir konnten sehen.«
Tomtefar2
Registered User
Posts: 12
Joined: Thu Nov 13, 2014 6:20 pm

Re: Allow reuse of username

Post by Tomtefar2 »

I have thought of this solution and it is not a bad suggestion. I see three problems:
1. Email validation will not work as intended
2. Email field needs to be populated on registration
3. Username is used literally everywhere. Member search needs to be changed etc.

My guess is that it would be easier to enable the reuse of usernames (the same function that is used for email in ACP exists) and change login to email validation instead of username validation. In my mind this seems to need less change and be more "correct".
User avatar
Wolfsblvt
Registered User
Posts: 634
Joined: Sun Oct 26, 2014 9:12 pm
Location: Solingen, Germany
Contact:

Re: Allow reuse of username

Post by Wolfsblvt »

I don't know how often the core uses just usernames to get user data, but surely extensions will. You can't get users by their username anymore. Don't know to wich problems this may lead.
You can try, of course, but I would be cautious with it.

Just a random idea. What about adding something to the username if it already exists, like some rarely used special character followed by a digit, wich makes the name unique, and strip of this when you get the username.
But this wouldn't solve the places where it is used and the member search, etc.

Sounds not like an easy extension.
If you have a specific extension request and you are willing to pay for, you can write me a PM.
My extensions (Trending: @Mention SystemAdvanced PollsUser Online Time)

»Du kamst zu uns. Deine Stimme kam. Du zeigtest uns die Sterne. Sie funkelten. Wir konnten sehen.«
Tomtefar2
Registered User
Posts: 12
Joined: Thu Nov 13, 2014 6:20 pm

Re: Allow reuse of username

Post by Tomtefar2 »

Wolfsblvt wrote:I don't know how often the core uses just usernames to get user data, but surely extensions will. You can't get users by their username anymore. Don't know to wich problems this may lead.
You can try, of course, but I would be cautious with it.

Just a random idea. What about adding something to the username if it already exists, like some rarely used special character followed by a digit, wich makes the name unique, and strip of this when you get the username.
But this wouldn't solve the places where it is used and the member search, etc.

Sounds not like an easy extension.
Thank you for the heads up, did not think about that part.

I have thought of the possibility as well to add characters but I did not find a solution that satisfied me.

My thought is that if one can enable and disable the reuse of e-mail, this function should not be that hard to "copy" and apply for username, however, I do not possess the necessary knowledge.
Post Reply

Return to “Extension Requests”