'user', 'requestData' => [] ]; } public function handler() { if (Controller::isStaffLogged()) { Response::respondError(ERRORS::INVALID_CREDENTIALS); return; } $user = Controller::getLoggedUser(); $parsedTicketList = []; $ticketList = $user->sharedTicketList; foreach($ticketList as $ticket) { $parsedTicketList[] = $ticket->toArray(true); } Response::respondSuccess([ 'name' => $user->name, 'email' => $user->email, 'verified' => !$user->verificationToken, 'tickets' => $parsedTicketList ]); } }