Skip to content

Commit da20f93

Browse files
Hackwarlaoneo
andauthored
[5.2] Fixing timezone and language parameter in API token auth response (joomla#43351)
* Fixing timezone and language parameter in API token auth response * Switching from GMT to UTC * Update libraries/src/User/User.php --------- Co-authored-by: Allon Moritz <[email protected]>
1 parent a5bdf38 commit da20f93

File tree

1 file changed

+2
-2
lines changed
  • plugins/api-authentication/token/src/Extension

1 file changed

+2
-2
lines changed

plugins/api-authentication/token/src/Extension/Token.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ public function onUserAuthenticate(AuthenticationEvent $event): void
252252
$response->username = $user->username;
253253
$response->email = $user->email;
254254
$response->fullname = $user->name;
255-
$response->timezone = $user->get('timezone');
256-
$response->language = $user->get('language');
255+
$response->timezone = $user->getParam('timezone', $this->getApplication()->get('offset', 'UTC'));
256+
$response->language = $user->getParam('language', $this->getApplication()->get('language'));
257257

258258
// Stop event propagation when status is STATUS_SUCCESS
259259
$event->stopPropagation();

0 commit comments

Comments
 (0)