Previous Thread
Next Thread
Print Thread
Hop To
Joined: Apr 2008
Posts: 33
R
newbie
newbie
R Offline
Joined: Apr 2008
Posts: 33
Running UBBT 7.5.3

We've customized our site so that the display name field no longer appears on the registration screen, and whatever someone enters for username is automatically his display name also. Now we want to change existing accounts so that each member's display name will match his/her username, and I have a couple of questions:

1) I've come up with a list of members whose display name is not the same as their username, but I'd like to cross-check it. Is there some sort of query we can run, or another way of producing a list so I can confirm mine?

2) For any members who want their display name changed to match their username, I can do that in the control panel. But for those who want their username changed to match their current display name, I can't do it via the CP. Is there a way to change usernames? If so, is there a way to change all the accounts with "wrong" usernames, so that their display names becomes their usernames?


Running UBB.threads 7.5.5 as of May 23 2010
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
1) This query will give the userid, display name and login name of all users that have a display name that doesn't match their login name.

SQL Query
select USER_ID,USER_DISPLAY_NAME,USER_LOGIN_NAME
from ubbt_USERS
where USER_DISPLAY_NAME <> USER_LOGIN_NAME

2) To change a user's display name to match their login name you can run the query below, just substitute $userid with the userid in question:

SQL Query
update ubbt_USERS
set USER_LOGIN_NAME=USER_DISPLAY_NAME
where USER_ID = '$userid'

Joined: Apr 2008
Posts: 33
R
newbie
newbie
R Offline
Joined: Apr 2008
Posts: 33
Thank you, Rick. smile

I'm confused about your response to #2. Does that query replicate the display name change I can do in the CP, or does it instead change the login name? The latter is what I need help with.


Running UBB.threads 7.5.5 as of May 23 2010
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
That query will set their login name to whatever their display name is.

Joined: Apr 2008
Posts: 33
R
newbie
newbie
R Offline
Joined: Apr 2008
Posts: 33
Wonderful!

Many thanks for your help.


Running UBB.threads 7.5.5 as of May 23 2010

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (DennyP, 1 invisible), 969 guests, and 171 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)