403 Forbidden on Server

Hi, on localhost the project works fine, on the server too, but when I do a filter by author on the blog it returns a 403:

Forbidden
You don’t have permission to access this resource.

I’m filtering the posts by the user with this code:

if ($author = param('author')) {
    if($user = kirby()->users()->findBy('email', urldecode($author))){
      $posts = $posts->filter(function($child) use($user) {
        return $child->author()->toUsers()->has($user);
      });
    }
  }

Any ideas?
Many thanks.

Probably because of the dots in the email. If I were you, I wouldn’t filter by email but by user id. Why would you want to publish user email addresses, after all, that is a privacy issues.

Yeah, thanks @texnixe it’s working now!