This commit is contained in:
mkm 2024-01-12 14:05:41 +08:00
parent 7a7c60b1ba
commit d1dbca47b9

View File

@ -30,13 +30,13 @@ class Member extends CommonModel
$configModel = new SystemConfig();
$config = $configModel->info();
if ($config['single_mode'] && $config['single_org_code']) {
$list = MemberAccount::where(['member_code' => $member['code'], 'organization_code' => $config['single_org_code']])->order('id asc')->select()->toArray();
$list = MemberAccount::where(['member_code' => $member['code'], 'organization_code' => $config['single_org_code']])->where('authorize','<>','')->order('id asc')->select()->toArray();
if (!$list) {
MemberAccount::inviteMember($member['code'], $config['single_org_code']);
$list = MemberAccount::where(['member_code' => $member['code'], 'organization_code' => $config['single_org_code']])->order('id asc')->select()->toArray();
$list = MemberAccount::where(['member_code' => $member['code'], 'organization_code' => $config['single_org_code']])->where('authorize','<>','')->order('id asc')->select()->toArray();
}
} else {
$list = MemberAccount::where(['member_code' => $member['code']])->order('id asc')->select()->toArray();
$list = MemberAccount::where(['member_code' => $member['code']])->where('authorize','<>','')->order('id asc')->select()->toArray();
}
$organizationList = self::getOrgList($member['code'], true);
@ -95,7 +95,7 @@ class Member extends CommonModel
return $organizationList;
}
}
$list = MemberAccount::where(['member_code' => $memberCode])->where('authorize','<>','')->order('id asc')->select()->toArray();
$list = MemberAccount::where(['member_code' => $memberCode])->order('id asc')->select()->toArray();
if ($list) {
$configModel = new SystemConfig();
$config = $configModel->info();