public function action_getAccount() { $this->STOP_PROPAGATION = true; $account = []; if ($this->user->isLogged()) { $account = accountData::getUserData($this->user->getId()); } else { $account['jmeno_uzivatel'] = $this->user->getUserName(); } return ["success" => true, 'account' => $account]; }