You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior
A user not found handler, not a spinning icon with error popup
Environment
Flarum version: beta 0.9
Possible Solution
protected function data(ServerRequestInterface $request, Document $document)
{
$id = Arr::get($request->getQueryParams(), 'id');
if (! is_numeric($id)) {
$id = $this->users->getIdForUsername($id);
}
$actor = $request->getAttribute('actor');
if ($actor->id == $id) {
//should be === when $actor->id = 0 and $id = null
$this->serializer = CurrentUserSerializer::class;
}
return $this->users->findOrFail($id, $actor);
//-> need better handler when actor is guest and $id = null, save some DB queries
}
The text was updated successfully, but these errors were encountered:
Bug Report
Current Behavior
spinning icon with error popup when go to url with invalid/not existed usename
Steps to Reproduce
Expected Behavior
A user not found handler, not a spinning icon with error popup
Environment
Possible Solution
The text was updated successfully, but these errors were encountered: