Notice (1024) : Undefined property `UsersController::$Authentication` in `/var/www/vhosts/naory.fr/web/src/Controller/UsersController.php` on line 16 [in /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Controller/Controller.php, line 313]
Warning (512) : Unable to emit headers. Headers sent in file=/var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/vhosts/naory.fr/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: Call to a member function getResult() on null

Call to a member function getResult() on null 📋

Error
Error in: APP/Controller/UsersController.php, line 16
APP/Controller/UsersController.php at line 16 (edit)
    public function login()
    {
        $this->request->allowMethod(['get''post']);
        $result $this->Authentication->getResult();
        if ($result->isValid()) {
            $target $this->Authentication->getLoginRedirect() ?? ['controller'=>'Customers','action'=>'index'];
            return $this->redirect($target);
        }

If you want to customize this error message, create templates/Error/error500.php