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
Describe your use case and the problem you are facing
Using wp user get writes to stderr when the user doesn't exist, which makes it porcelain, since it needs to be parsed and processed to be able to distinguish between user doesn't exist and unrelated errors.
Describe the solution you'd like
There should be a command like wp user exists to check whether a user exists or not, returning 0 on success, 1 if it doesn't exist and not write anything to stderr in that case.
Like wp plugin is-active which does this for plugins.
Activity
swissspidy commentedon Mar 4, 2024
Sounds reasonable 👍 There are already similar commands such as
wp post existsandwp comment exists.We could consider adding an
existscommand for all entities that have agetcommand already, for consistency.