Skip to content

Commit 4b8c4cc

Browse files
committed
Add wp user check-password to readme
1 parent 2265d64 commit 4b8c4cc

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6680,6 +6680,39 @@ wp user application-password update <user> <uuid> [--<field>=<value>]
66806680

66816681

66826682

6683+
### wp user check-password
6684+
6685+
Checks if a user's password is valid or not.
6686+
6687+
~~~
6688+
wp user check-password <user> <user_pass> [--escape-chars]
6689+
~~~
6690+
6691+
**OPTIONS**
6692+
6693+
<user>
6694+
The user login, user email or user ID of the user to check credentials for.
6695+
6696+
<user_pass>
6697+
A string that contains the plain text password for the user.
6698+
6699+
[--escape-chars]
6700+
Escape password with `wp_slash()` to mimic the same behavior as `wp-login.php`.
6701+
6702+
**EXAMPLES**
6703+
6704+
# Check whether given credentials are valid; exit status 0 if valid, otherwise 1
6705+
$ wp user check-password admin adminpass
6706+
$ echo $?
6707+
1
6708+
6709+
# Bash script for checking whether given credentials are valid or not
6710+
if ! $(wp user check-password admin adminpass); then
6711+
notify-send "Invalid Credentials";
6712+
fi
6713+
6714+
6715+
66836716
### wp user create
66846717

66856718
Creates a new user.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@
202202
"user application-password list",
203203
"user application-password record-usage",
204204
"user application-password update",
205+
"user check-password",
205206
"user create",
206207
"user delete",
207208
"user exists",

0 commit comments

Comments
 (0)