/** * @param $id * @return bool * @throws \Nette\InvalidArgumentException */ public function delete($id) { if ($user = $this->userFacade->getOne($id)) { $this->userFacade->delete($user); return true; } else { throw new \Nette\InvalidArgumentException('User with ID "' . $id . '" does not exist'); } }