Skip to content

Commit

Permalink
[K6.4] 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 22, 2025
1 parent 485acab commit fe63df1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 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 @@ -397,8 +397,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
8 changes: 4 additions & 4 deletions src/plugins/plg_system_kunena/kunena.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public function __construct(object $subject, array $config)
if ($this->app->scope == 'com_kunena') {
if (!PluginHelper::isEnabled('kunena', 'powered')) {
$styles = <<<EOF
.layout#kunena + div { display: block !important;}
#kunena + div { display: block !important;}
EOF;
.layout#kunena + div { display: block !important;}
#kunena + div { display: block !important;}
EOF;

KunenaTemplate::getInstance()->addStyleDeclaration($styles);
}
Expand All @@ -109,7 +109,7 @@ public function __construct(object $subject, array $config)
$this->loadLanguage('plg_system_kunena.sys');
}

/**
/**
* After initialise.
*
* @return void
Expand Down

0 comments on commit fe63df1

Please sign in to comment.