Fixed phpBB-3.2 > Xenforo 2.1.11

nero

Member
Affected version
2.1.11
Hi all,

I'm working on converting a phpBB-3.2 board into Xenforo. Everything seemed to run fine but after completing the migration I realize that users that were inactive in phpBB are active in Xenforo. Did I miss something? Is there any way to fix that (either before, during the import or after)?

Thanks for your help!
 
What do you mean by active, exactly?

What setting or database field in phpBB 3.2 indicates a user is inactive? Pretty sure it should be matched appropriately.
 
Hi,

In the phpBB database, the user I'm checking has:
  • user_type = 1
  • user_inactive_reason = 3
  • user_inactive_time = 1258135897

In Xenforo, this user appears with user_state = valid
 
Do we know what user_inactive_reason = 3 means? We only handle 1 which is "Awaiting approval" or "Awaiting email confirmation" and 2 which is "Awaiting email confirmation (from edit)".
 
Aha!

PHP:
define('INACTIVE_REGISTER', 1); // Newly registered account
define('INACTIVE_PROFILE', 2); // Profile details changed
define('INACTIVE_MANUAL', 3); // Account deactivated by administrator
define('INACTIVE_REMIND', 4); // Forced user account reactivation

We'll bake this into the next release, but yeah, as you said you probably want to handle this before import for now.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XFI release (1.4.1).

Change log:
Handle more inactive user cases when importing users from phpBB
There may be a delay before changes are rolled out to the XenForo Community.
 
If you wanted to handle this in the code rather than in the database then these are the changes we're including in the next version,

Open:
Code:
src/addons/XFI/Import/Importer/PhpBb.php

Find:
PHP:
if ($user['group_id'] == 3) // coppa
{
   $import->user_state = 'moderated';
}
else if ($user['user_type'] == 1 && $user['user_inactive_reason'] == 1) // inactive at registration
{
   $import->user_state = ($this->session->extra['userActivationSetting'] == 2 ? 'moderated' : 'email_confirm');
}
else if ($user['user_type'] == 1 && $user['user_inactive_reason'] == 2) // inactive at profile edit
{
   $import->user_state = 'email_confirm_edit';
}
else
{
   $import->user_state = 'valid';
}

Replace:
PHP:
if ($user['group_id'] == 3) // coppa
{
   $import->user_state = 'moderated';
}
else if ($user['user_type'] == 1)
{
   switch ($user['user_inactive_reason'])
   {
      case 1:
         // INACTIVE_REGISTER - Newly registered account
         $import->user_state = ($this->session->extra['userActivationSetting'] == 2 ? 'moderated' : 'email_confirm');
         break;

      case 2:
         // INACTIVE_PROFILE - Profile details changed
         $import->user_state = 'email_confirm_edit';
         break;

      case 3:
         // INACTIVE_MANUAL - Account deactivated by administrator
         $import->user_state = 'disabled';
         break;

      case 4:
         // INACTIVE_REMIND - Forced user account reactivation
         $import->user_state = 'moderated';
         break;

      default:
         // account not active but reason unknown we'll treat as disabled
         $import->user_state = 'disabled';
         break;
   }
}
else
{
   $import->user_state = 'valid';
}
 
Back
Top Bottom