mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Recreate member mid if config is normal but module instance is missing
This commit is contained in:
parent
b74a8db75b
commit
2af94e496e
1 changed files with 18 additions and 0 deletions
|
|
@ -186,6 +186,11 @@ class Member extends ModuleObject
|
|||
{
|
||||
return true;
|
||||
}
|
||||
$mid_info = ModuleModel::getModuleInfoByMid($config->mid);
|
||||
if (!$mid_info || $mid_info->module !== $this->module)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check members with phone country in old format
|
||||
if ($config->phone_number_default_country && !preg_match('/^[A-Z]{3}$/', $config->phone_number_default_country))
|
||||
|
|
@ -432,7 +437,20 @@ class Member extends ModuleObject
|
|||
$changed = false;
|
||||
|
||||
// Check mid
|
||||
$create_mid = false;
|
||||
if (empty($config->mid))
|
||||
{
|
||||
$create_mid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mid_info = ModuleModel::getModuleInfoByMid($config->mid);
|
||||
if (!$mid_info || $mid_info->module !== $this->module)
|
||||
{
|
||||
$create_mid = true;
|
||||
}
|
||||
}
|
||||
if ($create_mid)
|
||||
{
|
||||
$config->mid = 'member';
|
||||
$output = $this->createMid($config->mid, $config->skin ?: 'default', $config->mskin ?: 'default');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue