1
0
Fork 0

More joins replaced by view calls

This commit is contained in:
Michael 2020-04-24 11:55:46 +00:00
commit 4181eb37f5
3 changed files with 26 additions and 18 deletions

View file

@ -81,10 +81,7 @@ function poco_init(App $a) {
}
if (!$system_mode && !$global) {
$user = DBA::fetchFirst("SELECT `user`.`uid`, `user`.`nickname` FROM `user`
INNER JOIN `profile` ON `user`.`uid` = `profile`.`uid`
WHERE `user`.`nickname` = ? AND NOT `profile`.`hide-friends`",
$nickname);
$user = DBA::selectFirst('owner-view', ['uid', 'nickname'], ['nickname' => $nickname, 'hide-friends' => false]);
if (!DBA::isResult($user)) {
throw new \Friendica\Network\HTTPException\NotFoundException();
}