Best method for cleaning user database?

Having recently completed a transition from OJS 2.48 to 3.114, I’m now beginning to tackle a number of other issues with our OJS install and our journals program generally.

Unfortunately, our OJS3 installation was done without my prior knowledge and I spent most of November-January quickly training our users, setting up new customizing sites and generally getting these journals ready for the new install’s launch. That said, things that I might have wanted to do did not get done before launch.

Specifically, I was hoping to clean our user database with its massive number of spam/junk accounts. Due to the high number of such accounts (some 36k which were associated with a long since removed journal), I was hoping to be able to edit the user database directly and replace the file in the directory.

Thus, two questions:

  1. Am I way off base in thinking this to be a viable means for doing it?
  2. Is there a better way of removing spam accounts?

Having such a large number of these users makes the “merge users” method rather an unviable one, obviously.

Hi @akierig

Like the post you found suggests, the command line tool for merging users is probably the way to go. While it’s possible to work directly on the database you might miss some associated tables and end up with broken OJS pages because user_ids no longer point to real users, etc.

If you can generate a list of the users you don’t want any more, say by looking at a user export of users with no roles in a given journal, you can write a quick shell script to iterate over that list and merge those users with an admin account.

Cheers,
Jason

Hi @akierig,

You might want to check these recommendations: The Code4Lib Journal – Making the Move to Open Journal Systems 3: Recommendations for a (mostly) painless upgrade
There are some useful hints, I would say.

Regards, Primož

I just remembered seeing that the other day, thank you for reminding me! I guess we’re going to give this a shot a little later, couple other things on the list first.