Renaming of Users / Deleting Users? direct mysql manipulati

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 21
Joined: Wed Aug 04, 2010 3:36 pm

Renaming of Users / Deleting Users? direct mysql manipulati

Postby iaw4 » Mon Sep 13, 2010 7:50 am

I have to change the naming scheme of users my system. Fortunately, I still have few enough users to be able to do this by hand. Alas, what is a good way to do this for 100 users?

I could go into the mysql data base and change the user id's. in a sense, this would be easiest, but I am worried that OJS uses the user name as a key elsewhere, and that this would totally hose my OJS system. can this be done?

I could retype every user's information into a new user, then merge it, and then double check that the merge was right. I would need to copy the required fields only. Rather inconvenient, but doable.

is direct mysql modification safe?



Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Renaming of Users / Deleting Users? direct mysql manipulati

Postby mcrider » Mon Sep 13, 2010 11:29 am

Hi iaw,

This should be fine, but you'll also have to change the passwords as the password is based on a hash of the username + the password. So in each case you change the username, you have to issue

Code: Select all

UPDATE users SET password=md5(concat('(new username')', '(new password goes here)')) WHERE username='(old username)';

Make sure you make a backup of your DB and do some tests to make sure your changes work alright.


Return to “OJS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest