I had tweaked a previous version of this plugin to not only ignore the ‘administrator’ role when deciding how to apply new roles to imported users, but also a whole slew of additional role names, by using an ‘array_intersect()’. However, this seems to no longer be working with the latest version of the plugin and php 8.0. Is there another different check performed to line ~569 in classes/import.php, or am I just a bad programmer?
These were my two replacement lines to the original ‘if( !( in_array(“administrator”,’… line, making sure the user is not any of the listed protected roles:
$protected_roles = array(‘administrator’,’board_member’,’give_worker’,’give_manager’,’give_accountant’,’give_donor’,’give_subscriber’);
if( !( count(array_intersect($protected_roles, $acui_helper->get_roles_by_user_id( $user_id ))) == 0 || is_multisite() && is_super_admin( $user_id ) )){
