category == 1) { $result = true; } return $result; } public static function getCommonUserCompanyScanId(BaseUser $userInfo) { $LwtCompanyInfo = LwtCompanyInfoBase::findOne(["company_name" => $userInfo->company]); if ($LwtCompanyInfo) { $scan_id = $LwtCompanyInfo->scan_id; } else { $scan_id = $userInfo->login_name; } return $scan_id; } public static function ifCommonUserAddScanId(BaseUser $userInfo) { $addParams = []; if (self::isCommonUser($userInfo)) { $addParams["scan_id"] = $userInfo->CompanyScanId; } return $addParams; } }