Deleting users from the OJS database

  1. I have a php executable in my “path” on windows and on linux.
  2. I make a list of “bad” users by database query ( for example select username from ojs.users WHERE user_id in (select user_id from ojs.user_settings WHERE setting_value like '%porno%');)
  3. I make a batch file in a text editor by replacing “\nbadusername” to “\nphp pathtotools\megreusers.php tempusername badusername”
  4. After this, I just run batch file in the shell (windows or linux) and see a result. Deleting/merging of big (10K+) groups of users is very long procedure.
3 Likes