Deleting users from the OJS database

I too would love a way to just check a checkbox(es) and either delete or merge users automatically through the UI.

In the mean time, as a novice bash user, this worked for me.

SSH into your hosting environment/bash, cd into your OJS directory, and create a space-separated array of usernames and hit Enter/Return.

Example:
users=(username1 username2 username3 username4)

Assuming you’re in the main OJS directory, then type this:
for i in "${users[@]}"; do php tools/mergeUsers.php username_to_merge_into_here $i; done

This will loop through your array and merge each user in the “users” array into the “username_to_merge_into_here” username. Obviously replace that with the username you want to merge into. Also be sure that the mergeUsers.php has execute permissions for your user account.

2 Likes