I have made a custom login plugin for Joomla 3 and now for Joomla 4. However, in Joomla 4, the login works as it should, but it generates a stack dump in the error log:

[Mon Jun 06 10:13:58.034860 2022] [proxy_fcgi:error] [pid 100000:tid 140131864393280] [client 2a02:968:***:***:***:***:***:***:38362] AH01071: Got error '
PHP message: 
PHP Warning:  Undefined property: PlgAuthenticationhccxmlauthenticatie::$name in /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Authentication/Authentication.
PHP on line 184
PHP message: 
PHP Stack trace:
PHP message: 
PHP   1. {main}() /disk/site/ontwikkel/joomla4-dev/www/index.
PHP message: 
PHP   2. require_once() /disk/site/ontwikkel/joomla4-dev/www/index.
PHP message: 
PHP   3. Joomla\\CMS\\Application\\CMSApplication->execute() /disk/site/ontwikkel/joomla4-dev/www/includes/app.
PHP message: 
PHP   4. Joomla\\CMS\\Application\\SiteApplication->doExecute() /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Application/CMSApplication.
PHP message: 
PHP   5. Joomla\\CMS\\Application\\SiteApplication->dispatch($component = *uninitialized*) /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Application/SiteApplication.
PHP message: 
PHP   6. Joomla\\CMS\\Component\\ComponentHelper::renderComponent($option = 'com_users', $params = *uninitialized*) /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Application/SiteApplication.
PHP message: 
PHP   7. Joomla\\CMS\\Dispatcher\\ComponentDispatcher->dispatch() /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Component/ComponentHelper.
PHP message: 
PHP   8. Joomla\\CMS\\MVC\\Controller\\BaseController->execute($task = 'login') /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Dispatcher/ComponentDispatcher.
PHP message: 
PHP   9. Joomla\\Component\\Users\\Site\\Controller\\UserController->login() /disk/site/ontwikkel/joomla4-dev/www/libraries/src/MVC/Controller/BaseController.
PHP message: 
PHP  10. Joomla\\CMS\\Application\\SiteApplication->login($credentials = ['username' => '********', 'password' => '********', 'secretkey' => ''], $options = ['remember' => FALSE, 'return' => 'https://www.some.tld/']) /disk/site/ontwikkel/joomla4-dev/www/components/com_users/src/Controller/UserController.
PHP message: 
PHP  11. Joomla\\CMS\\Application\\CMSApplication->login($credentials = ['username' => '********', 'password' => '********', 'secretkey' => ''], $options = ['remember' => FALSE, 'return' => 'https://www.some.tld/', 'entry_url' => 'https://www.some.tld/index.
PHP?option=com_users&task=user.login', 'action' => 'core.login.site']) /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Application/SiteApplication.
PHP message: 
PHP  12. Joomla\\CMS\\Authentication\\Authentication->authenticate($credentials = ['username' => '********', 'password' => '********', 'secretkey' => ''], $options = ['remember' => FALSE, 'return' => 'https://www.some.tld/', 'entry_url' => 'https://www.some.tld/index.
PHP?option=com_users&task=user.login', 'action' => 'core.login.site']) /disk/site/ontwikkel/joomla4-dev/www/libraries/src/Application/CMSApplication.
PHP:822', referer: https://www.some.tld/

How do I set the undefined property $name?

  • It's a J4 bug. You should report it to developers.
    – Sharky
    Jun 6 at 11:27
  • I will test if its also there with vanila installation to be continued Jun 7 at 7:19

1 Answer 1


You can Use this.

$name = $this->Auth->getUser();

that is all.

But to retrieve user's data other than id. For more info see it.https://laravel.com/docs/4.2/security#authenticating-users

  • This answer was auto-flagged as "low-quality" due to its length. Bas is asking how to implement a fix for $name. Please edit your answer to give more generous insights. Please understand that even if Bas knows how to implement your advice, the general public might not. Stack Exchange answers should endeavour to help many people by educationally resolving one person's question. Please take our tour.
    – mickmackusa
    Jun 8 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.