File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff 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
66856718Creates a new user.
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments