×

Error

Please login first

Login little bug: username shown instead of name

15 years 6 months ago #78987 by grosbedo
Hello,
there is a bug in /modules/mod_cblogin/mod_cblogin.php which makes the script to always show the username instead of the CommunityBuilder DB firstname or Joomla DB name.

The problem since to reside here, at line 96:

[code:1]
$name = $params->get( 'name', 0 );
[/code:1]

Which always return $name == 0

Later on, between lines 168 and 179:

[code:1] if ($name) {
if ($name == 2) {
$query = "SELECT firstname FROM #__comprofiler WHERE id = ". (int) $_CB_framework->myId();
} else {
$query = "SELECT name FROM #__users WHERE id = ". (int) $_CB_framework->myId();
}
[...]
} else {
$name = htmlspecialchars( cbUnHtmlspecialchars( $_CB_framework->myUsername() ) );
}[/code:1]

As you can see, this is where the problem come from. But I didn't had the time to look further into the code to understand where is the flaw exactly, but I'm sure you'll be able to fix it easily ;)

Cordially

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.140 seconds

Facebook Twitter LinkedIn