Open jim-p opened 6 years ago
it seems you're well aware of the solution, I would really appreciate a pull request 😄
Fair enough! I'd love to dig in and try that but at the moment I don't have time available to take that on. :)
Now that our import is done we likely won't need this again, but I figured it was worth noting for the next person who came along and needed it.
We have a rather large userbase (considering banned users, close to 300k users) that mostly imported OK from SMF but we hand a handful of users (43 users, ~0.015%) that had incorrect bans. After digging around in the old SMF ban tables we found that a few conditions which led to SMF users without an active ban ending up banned in NodeBB after import. These include:
select * from smf_ban_groups where expire_time = 0;
select * from smf_ban_groups where expire_time <> 0 and expire_time is not null;
select * from smf_ban_groups where id_ban_group not in (select id_ban_group from smf_ban_items);