Skip to content

Users fieldtype with default: current errors on Eloquent, Postgres, and UUIDs #14723

@joshuablum

Description

@joshuablum

Bug description

When using Eloquent users with Postgres and UUIDs for users, a users blueprint field configured with default: current might resolve the literal string current as if it were the user's Id. This throws an error instead of resolving to the actual authenticated user.

How to reproduce

  • Use Eloquent/db users with Postgres
  • Use UUIDs for users
  • Set default: current when using the users fieldtype in a blueprint
  • Create/open an entry using this blueprint

Logs

Environment

Environment
Laravel Version: 12.58.0
PHP Version: 8.5.5
Composer Version: 2.9.5
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: reverb
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 1
License Key: Set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.x-dev PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions