Skip to Content Skip to Menu

(NO BUG) bug with realnames

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 9 months ago #89118 by slabbi
Replied by slabbi on topic Re:(NO BUG) bug with realnames
I see. I assume that FB calls uddeIM using IDs and uddeIM shows the corresponding realname in the compose dialog.

So when you switch uddeIM to use usernames it should work for you.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 9 months ago #89125 by slabbi
Replied by slabbi on topic Re:(NO BUG) bug with realnames
You can try following:

Replace one function in includes.db.php:

[code:1]function uddeIMgetNameFromID($id, $config) {
$database = uddeIMgetDatabase();
$sql="SELECT ".($config->realnames ? "name" : "username"«»)." FROM #__users WHERE id=".(int)$id;
$database->setQuery($sql);
$value = $database->loadResult();

// BUGBUG: Next few lines are experimental
// when we have realnames, check if the realname is used several times
if ($config->realnames) {
$sql="SELECT count(id) FROM #__users WHERE name=".$database->Quote( $value );
$database->setQuery($sql);
$cnt = (int)$database->loadResult();
if ($cnt>1) {
// ups, we have more than one realname matching the result, so return the username instead
$sql="SELECT username FROM #__users WHERE id=".(int)$id;
$database->setQuery($sql);
$value = $database->loadResult();
}
}
return $value;
}
[/code:1]

This is highly experimental, since I have not checked if it uses the correct name later when the massage is processed.

The function checks if there is a second realname and if so it returns the username instead.

Post edited by: slabbi, at: 2009/02/18 13:59

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 9 months ago #89127 by slabbi
Replied by slabbi on topic Re:(NO BUG) bug with realnames
Please give feedback how this works for you.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • loila
  • loila
  • OFFLINE
  • Posts: 20
  • Thanks: 0
  • Karma: 1
15 years 9 months ago #89133 by loila
Replied by loila on topic Re:(NO BUG) bug with realnames
it doesnt work :(
it just return 0 value on the To: tab in the inbox

www.vidogg.com

Dedicated

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 9 months ago #89134 by slabbi
Replied by slabbi on topic Re:(NO BUG) bug with realnames
Sorry, there was a typo. Could you check again (I corrected the code above)?

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • loila
  • loila
  • OFFLINE
  • Posts: 20
  • Thanks: 0
  • Karma: 1
15 years 9 months ago #89135 by loila
Replied by loila on topic Re:bug with realnames
i make the change "name" : "username" to "username" : "username"

it looks working :)

[code:1]

function uddeIMgetNameFromID($id, $config) {
$database = uddeIMgetDatabase();
$sql="SELECT ".($config->realnames ? "username" : "username"«»)." FROM #__users WHERE id=".(int)$id;
$database->setQuery($sql);
$value = $database->loadResult();
return $value;
}[/code:1]

www.vidogg.com

Dedicated

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum