1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Fix posts being incorrectly visible on user page. closes #680

- When no discussions are visible, the query that filters posts by discussion visibility was incorrectly making all posts visible.
- Also hide user profiles altogether if discussions are not visible.
This commit is contained in:
Toby Zerner
2016-03-10 17:50:29 +10:30
parent 2391471937
commit beb2f91fef
2 changed files with 14 additions and 0 deletions

View File

@@ -96,6 +96,8 @@ class PostRepository
event(new ScopePostVisibility($discussion, $query, $actor));
});
}
$query->orWhereRaw('FALSE');
})
->get();