Hi,

Is there any possibility to change a username in drupal?
In database->users there is a field, 'name' which has the username i want to change to something else.
All other things should be untouched.

Any suggestions for doing this a safe way?
Im in no position just to take a shot and test changing it, i must know it will work without crashes...

In code...
Please?

Comments

nevets’s picture

Why not just edit the users account?

arne_hortell’s picture

I have some hundreds of users with bad usernames and i which to change it to something else.
If it was just one, i would do it manually but i need doing it the programatically way.

Nothing is impossible, the impossible just takes a little more time

arne_hortell’s picture

Which also is an issue.
If i do it manually it will be validated, but i dont want that.

Nothing is impossible, the impossible just takes a little more time

jaypan’s picture

You want to change the the username in the database, so you either need to do it through the admin interface, to edit it directly in the database, or create a script that will alter the username in the database.

Contact me to contract me for D7 -> D10/11 migrations.

tassaf’s picture

If there are many users then you have to create your own script to update each user

Tell use what do you want to do for those usernames, may be we can help