Skip to content

Commit

Permalink
[K6.3] Automatic User Sync Failure in Kunena 6.3.8 with J!5.2.4 #9833
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Feb 21, 2025
1 parent e3e9611 commit 70cfa86
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/libraries/kunena/src/User/KunenaUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,10 @@ public function __construct($identifier = 0)
$this->load($identifier);
}

if (!isset($this->userid)) {
if (!isset($identifier)) {
$this->userid = 0;
} else {
$this->userid = $identifier;
}

$this->_db = Factory::getContainer()->get('DatabaseDriver');
Expand Down
5 changes: 4 additions & 1 deletion src/libraries/kunena/src/User/KunenaUserHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ public static function get($identifier = null, $reload = false): ?KunenaUser
if ($id === 0) {
KunenaProfiler::getInstance() ? KunenaProfiler::instance()->stop('function ' . __CLASS__ . '::' . __FUNCTION__ . '()') : null;

return new KunenaUser($id);
$newUser = new KunenaUser($id);
$newUser->userid = $id;

return $newUser;
} elseif ($reload || empty(self::$_instances [$id])) {
self::$_instances [$id] = new KunenaUser($id);

Expand Down
5 changes: 3 additions & 2 deletions src/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Pkg_KunenaInstallerScript extends InstallerScript
* @var string
* @since 6.0.0
*/
protected $minimumJoomla = '4.4.10';
protected $minimumJoomla = '4.4.11';

/**
* List of supported versions. Newest version first!
Expand Down Expand Up @@ -69,6 +69,7 @@ class Pkg_KunenaInstallerScript extends InstallerScript
'0' => '8.0.13', // Preferred version
],
'mariaDB' => [
'11.5' => '11.5.2',
'11.4' => '11.4.2',
'11.3' => '11.3',
'11.2' => '11.2',
Expand All @@ -92,7 +93,7 @@ class Pkg_KunenaInstallerScript extends InstallerScript
'5.2' => '5.2.4',
'5.1' => '5.1.4',
'5.0' => '5.0.3',
'4.4' => '4.4.10',
'4.4' => '4.4.11',
'0' => '5.2.4', // Preferred version
],
];
Expand Down

0 comments on commit 70cfa86

Please sign in to comment.