WpUserContext
in package
implements
UserContextResolverInterface
FinalYes
WordPress user context resolver.
Resolves the current user ID via UserSupport::currentUserId(). Returns null when no user is authenticated (e.g. WP-CLI, cron).
Public surface: the consumer's composition root registers this concrete for
the framework UserContextResolverInterface — this adapter ships no container
builder, so whoever boots the plugin names the class.
Table of Contents
Interfaces
- UserContextResolverInterface
Methods
- getCurrentUserId() : int|null
Methods
getCurrentUserId()
public
getCurrentUserId() : int|null