src/Mvc/Controller/IndexController.php
public function confirmEmailAction()
    {
        $token = $this->params()->fromRoute('token');
        if ($token) {
            $identity = $this->getUserService()->confirmEmail($token);
            if ($identity instanceof ResponseInterface) {
                return $identity;
            } elseif ($identity) {
                $viewModel = new ViewModel(compact('identity'));
                $viewModel->setTemplate('cms-user/index/confirm-email');
                return $viewModel;
            }
        }

        return $this->redirect()->toRoute($this->getOptions()->getDefaultUserRoute());
    }
public function confirmEmailAction()
    {
        $token = $this->params()->fromRoute('token');
        if ($token) {
            $identity = $this->getUserService()->confirmEmail($token);
            if ($identity instanceof ResponseInterface) {
                return $identity;
            } elseif ($identity) {
                $viewModel = new ViewModel(compact('identity'));
                $viewModel->setTemplate('cms-user/index/confirm-email');
                return $viewModel;
            }
        }

        return $this->redirect()->toRoute($this->getOptions()->getDefaultUserRoute());
    }
User email confirm action

@return ResponseInterface|ViewModel