Infrastructure/Security/Authentication/AuthenticationController.php
public function routeGetLogout(Request $request, Response $response)
    {
        $this->events->setAdministratorId($this->authentication->getAdministratorId());

        if (null === $username = $this->authentication->getAdministratorUsername()) {
            $this->events->insertWarning(EVENT_LOGOUT_FAULT);
        } else {
            $this->events->insertInfo(EVENT_LOGOUT);
            $this->authentication->logout();
        }

        return $response->withRedirect($this->router->pathFor(ROUTE_HOME));
    }
public function routeGetLogout(Request $request, Response $response)
    {
        $this->events->setAdministratorId($this->authentication->getAdministratorId());

        if (null === $username = $this->authentication->getAdministratorUsername()) {
            $this->events->insertWarning(EVENT_LOGOUT_FAULT);
        } else {
            $this->events->insertInfo(EVENT_LOGOUT);
            $this->authentication->logout();
        }

        return $response->withRedirect($this->router->pathFor(ROUTE_HOME));
    }
public function routeGetLogout ( Request $ request , Response $ response ) { $ this -> events -> setAdministratorId ( $ this -> authentication -> getAdministratorId ( ) ) ; if ( null === $ username = $ this -> authentication -> getAdministratorUsername ( ) ) { $ this -> events -> insertWarning ( EVENT_LOGOUT_FAULT ) ; } else { $ this -> events -> insertInfo ( EVENT_LOGOUT ) ; $ this -> authentication -> logout ( ) ; } return $ response -> withRedirect ( $ this -> router -> pathFor ( ROUTE_HOME ) ) ; }
since this extends AdminController and not AdminController, the administratorId property of Events service must be set for the logout function in order to have it know the current logged in administrator
since this extends AdminController and not AdminController the administratorId property of Events service must be set for the logout function in order to have it know the current logged in administrator