Someone complained about this today. Before finding all of this, I “solved” the problem something like this:
bad=User.where(approved: false);
bad.each do |user| puts "https://community.open-emr.org/admin/users/#{user.id}/#{user.username}"; end;
This prints the admin URLs for all of the users so you can then approve or delete them there, I think.
So I guess this is still a bug.
Oh, and so then:
ids=bad.pluck(:id);
ReviewableUser.where(type: 'ReviewableUser')
.where(target_id: ids)
.pluck(:target_id, :status)
Now returns something like this:
=> [[4610, "rejected"], [4527, "rejected"], [4643, "rejected"], [4648, "rejected"]]
So maybe those need to deleted from ReviewableUser?
Or maybe just delete the users?