public function filter($value)
    {
        if (!$value instanceof User) {
            return array();
        }

        $info = $value->getInfo();

        return array(
            'id' => $value->getId(),
            'name' => $info->displayName,
            'image' => $info->image ? $info->image->uri : '',
            'email' => $info->email,
        );
    }