mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 05:53:45 +08:00
Always allow users to see their own account. fixes #1626
This commit is contained in:
parent
ebcc173496
commit
b68f183e86
|
@ -39,7 +39,11 @@ class UserPolicy extends AbstractPolicy
|
|||
public function find(User $actor, Builder $query)
|
||||
{
|
||||
if ($actor->cannot('viewUserList')) {
|
||||
$query->whereRaw('FALSE');
|
||||
if ($actor->isGuest()) {
|
||||
$query->whereRaw('FALSE');
|
||||
} else {
|
||||
$query->where('id', $actor->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user