diff --git a/gpluspost/gpluspost.php b/gpluspost/gpluspost.php index 76cf237b..2a3037b9 100644 --- a/gpluspost/gpluspost.php +++ b/gpluspost/gpluspost.php @@ -154,13 +154,13 @@ function gpluspost_init() { if (isset($a->argv[1])) { $uid = (int)$a->argv[1]; if ($uid == 0) { - $contacts = q("SELECT `name`, `id` FROM contact WHERE `nick` = '%s' LIMIT 1", dbesc($a->argv[1])); + $contacts = q("SELECT `username`, `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", dbesc($a->argv[1])); if ($contacts) { - $uid = $contacts[0]["id"]; + $uid = $contacts[0]["uid"]; $nick = $a->argv[1]; } } else { - $contacts = q("SELECT `name` FROM contact WHERE ID=%d LIMIT 1", intval($uid)); + $contacts = q("SELECT `username` FROM `user` WHERE `uid`=%d LIMIT 1", intval($uid)); $nick = $uid; } } @@ -170,7 +170,7 @@ function gpluspost_init() { echo ''."\n"; echo "\t".'<![CDATA['.$a->config['sitename'].']]>'."\n"; if ($uid != 0) { - echo "\t".'\n"; + echo "\t".'\n"; echo "\t".''."\n"; } else echo "\t".''."\n";