f3->get('REQUEST.userId'); if (isset($userId) && is_numeric($userId)) { $result = $model->getEmailsByUserId($userId); } return $result; } public function getEmailDetails(int $apiKey): array { $params = $this->f3->get('GET'); $id = $params['id']; $model = new \Models\Email(); $details = $model->getEmailDetails($id, $apiKey); $details['enrichable'] = $this->isEnrichable($apiKey); $tsColumns = ['email_created', 'email_lastseen', 'domain_lastseen', 'domain_created']; \Utils\TimeZones::localizeTimestampsForActiveOperator($tsColumns, $details); return $details; } private function isEnrichable(int $apiKey): bool { $model = new \Models\ApiKeys(); return $model->attributeIsEnrichable('email', $apiKey); } }