wp user
Управляет пользователями, а также их ролями, возможностями и метаданными.
| Список команд | Описание |
|---|---|
| wp user list | Список пользователей. |
| wp user get | Получает сведения о пользователе. |
| wp user delete | Удаляет одного или нескольких пользователей с текущего сайта. |
| wp user create | Создает нового пользователя. |
| wp user update | Обновляет пользователя. |
| wp user generate | Создает указанное число новых пользователей с фиктивными данными. |
| wp user set-role | Устанавливает роль пользователя. |
| wp user add-role | Добавляет роль пользователя. |
| wp user remove-role | Удаляет роль пользователя. |
| wp user add-cap | Добавляет возможность пользователю. |
| wp user remove-cap | Удаляет возможность пользователя. |
| wp user list-caps | Список всех возможностей пользователя. |
| wp user import-csv | Импорт пользователей из CSV-файла. |
| wp user reset-password | Сбрасывает пароль для одного или нескольких пользователей. |
| wp user spam | Помечает одного или нескольких пользователей как спам. |
| wp user unspam | Удаляет одного или нескольких пользователей из спама. |
| wp user check-password | Проверяет, действителен ли пароль пользователя. |
| wp user meta list | Список всех метаданных, связанных с пользователем. |
| wp user meta get | Получает значение мета поля. |
| wp user meta delete | Удаляет мета-поле. |
| wp user meta add | Добавляет мета-поле. |
| wp user meta update | Обновляет мета-поле. |
| wp user meta pluck | Получает вложенное значение из мета-поля (из сериал-го массива). |
| wp user meta patch | Обновляет вложенного значения у мета-поля (сериал-го массива). |
| wp user term list | Список всех терминов, связанных с юзером. |
| wp user term remove | Удаление термина у юзера. |
| wp user term add | Добавление термина к юзеру. |
| wp user term set | Задает термины юзера. |
| wp user session destroy | Уничтожить сеанс (сессию) указанного юзера. |
| wp user session list | Список сеансов (сессий) указанного юзера. |
| wp user application-passwords list | Перечисляет все пароли приложений, связанные с пользователем. |
| wp user application-passwords get | Получает определенный пароль приложения. |
| wp user application-passwords create | Создает новый пароль приложения. |
| wp user application-passwords update | Обновляет существующий пароль приложения. |
| wp user application-passwords record-usage | Запись использования пароля приложения. |
| wp user application-passwords delete | Удаление существующего пароля приложения. |
| wp user application-passwords exists | Проверяет, существует ли пароль приложения для данного приложения. |
Примеры
# List user IDs $ wp user list --field=ID 1 # Create a new user. $ wp user create bob bob@example.com --role=author Success: Created user 3. Password: k9**&I4vNH(& # Update an existing user. $ wp user update 123 --display_name=Mary --user_pass=marypass Success: Updated user 123. # Delete user 123 and reassign posts to user 567 $ wp user delete 123 --reassign=567 Success: Removed user 123 from http://example.com
Исходный код команд
wp user list
Список пользователей.
Display WordPress users based on all arguments supported by WP_User_Query().
Использование
wp user list
Можно указать Глобальные параметры и следующие:
- [--role={role}]
- Only display users with a certain role.
- [--{field}={value}]
- Control output by one or more arguments of WP_User_Query().
- [--network]
- List all users in the network for multisite.
- [--field={field}]
- Prints the value of a single field for each user.
- [--fields={fields}]
- Limit the output to specific object fields.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- ids
- json
- count
- yaml
Доступные поля
These fields will be displayed by default for each user:
- ID
- user_login
- display_name
- user_email
- user_registered
- roles
These fields are optionally available:
- user_pass
- user_nicename
- user_url
- user_activation_key
- user_status
- spam
- deleted
- caps
- cap_key
- allcaps
- filter
- url
Примеры
# List user IDs $ wp user list --field=ID 1
# List users with administrator role $ wp user list --role=administrator --format=csv ID,user_login,display_name,user_email,user_registered,roles 1,supervisor,supervisor,supervisor@gmail.com,"2016-06-03 04:37:00",administrator
# List users with only given fields
$ wp user list --fields=display_name,user_email --format=json
[{"display_name":"supervisor","user_email":"supervisor@gmail.com"}]
# List users ordered by the 'last_activity' meta value. $ wp user list --meta_key=last_activity --orderby=meta_value_num
wp user get
Получает сведения о пользователе.
Использование
wp user get
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- [--field={field}]
- Instead of returning the whole user, returns the value of a single field.
- [--fields={fields}]
- Get a specific subset of the user's fields.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- yaml
Примеры
# Get user $ wp user get 12 --field=login supervisor
# Get user and export to JSON file $ wp user get bob --format=json > bob.json
wp user delete
Удаляет одного или нескольких пользователей с текущего сайта.
On multisite, wp user delete only removes the user from the current site. Include --network to also remove the user from the database, but make sure to reassign their posts prior to deleting the user.
Использование
wp user delete
Можно указать Глобальные параметры и следующие:
- {user}...
- The user login, user email, or user ID of the user(s) to delete.
- [--network]
- On multisite, delete the user from the entire network.
- [--reassign={user-id}]
- User ID to reassign the posts to.
- [--yes]
- Answer yes to any confirmation prompts.
Примеры
# Удалим двух пользователей по email и переназначим их данные (посты) на юзера 45 (admin) $ wp user delete user1@gmail.com user2@bk.ru --reassign=45 Success: Removed user 28 from https:. Success: Removed user 7 from https:.
# Delete user 123 and reassign posts to user 567 $ wp user delete 123 --reassign=567 Success: Removed user 123 from http://example.com
# Delete all contributors and reassign their posts to user 2 $ wp user delete $(wp user list --role=contributor --field=ID) --reassign=2 Success: Removed user 813 from http://example.com Success: Removed user 578 from http://example.com
wp user create
Создает нового пользователя.
Использование
wp user create
Можно указать Глобальные параметры и следующие:
- {user-login}
- The login of the user to create.
- {user-email}
- The email address of the user to create.
- [--role={role}]
- The role of the user to create. По умолчанию: default role. Possible values include 'administrator', 'editor', 'author', 'contributor', 'subscriber'.
- [--user_pass={password}]
- The user password. По умолчанию: randomly generated.
- [--user_registered={yyyy-mm-dd-hh-ii-ss}]
- The date the user registered. По умолчанию: current date.
- [--display_name={name}]
- The display name.
- [--user_nicename={nice_name}]
- A string that contains a URL-friendly name for the user. The default is the user's username.
- [--user_url={url}]
- A string containing the user's URL for the user's web site.
- [--nickname={nickname}]
- The user's nickname, defaults to the user's username.
- [--first_name={first_name}]
- The user's first name.
- [--last_name={last_name}]
- The user's last name.
- [--description={description}]
- A string containing content about the user.
- [--rich_editing={rich_editing}]
- A string for whether to enable the rich editor or not. False if not empty.
- [--send-email]
- Send an email to the user with their new account details.
- [--porcelain]
- Output just the new user id.
Примеры
# Create user $ wp user create bob bob@example.com --role=author Success: Created user 3. Password: k9**&I4vNH(&
# Create user without showing password upon success $ wp user create ann ann@example.com --porcelain 4
wp user update
Обновляет пользователя.
Использование
wp user update
Можно указать Глобальные параметры и следующие:
- {user}...
- The user login, user email or user ID of the user(s) to update.
- [--user_pass={password}]
- A string that contains the plain text password for the user.
- [--user_nicename={nice_name}]
- A string that contains a URL-friendly name for the user. The default is the user's username.
- [--user_url={url}]
- A string containing the user's URL for the user's web site.
- [--user_email={email}]
- A string containing the user's email address.
- [--display_name={display_name}]
- A string that will be shown on the site. Defaults to user's username.
- [--nickname={nickname}]
- The user's nickname, defaults to the user's username.
- [--first_name={first_name}]
- The user's first name.
- [--last_name={last_name}]
- The user's last name.
- [--description={description}]
- A string containing content about the user.
- [--rich_editing={rich_editing}]
- A string for whether to enable the rich editor or not. False if not empty.
- [--user_registered={yyyy-mm-dd-hh-ii-ss}]
- The date the user registered.
- [--role={role}]
- A string used to set the user's role.
- --{field}={value}
- One or more fields to update. For accepted fields, see wp_update_user().
- [--skip-email]
- Don't send an email notification to the user.
Примеры
# Update user $ wp user update 123 --display_name=Mary --user_pass=marypass Success: Updated user 123.
# Смена пароля пользователя USERNAME $ wp user update USERNAME --user_pass="PASSWORD"
wp user generate
Создает указанное число новых пользователей с фиктивными данными.
Использование
wp user generate
Можно указать Глобальные параметры и следующие:
- [--count={number}]
- Сколько пользователей создать?
По умолчанию: 100 - [--role={role}]
- Роль созданных пользователей.
По умолчанию: роль по умолчанию WordPress - [--format={format}]
В каком формате выводить результаты генерации.
По умолчанию: progress
Может быть:- progress
- ids
Примеры
# Add meta to every generated users. $ wp user generate --format=ids --count=3 | xargs -d ' ' -I % wp user meta add % foo bar Success: Added custom field. Success: Added custom field. Success: Added custom field.
wp user set-role
Устанавливает роль пользователя.
Использование
wp user set-role
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- [{role}]
- Make the user have the specified role. If not passed, the default role is used.
Примеры
$ wp user set-role 12 author Success: Added johndoe (12) to http://example.com as author.
wp user add-role
Добавляет роль пользователя.
Для мультисайта, позволяет добавить пользователя к указанному под-сайту (блогу).
Использование
wp user add-role
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- {role}
- Add the specified role to the user.
Примеры
$ wp user add-role 12 author Success: Added 'author' role for johndoe (12).
# add user 11 to /es multisite blog with author role $ wp user add-role 11 author --url=https://mysite.com/es
wp user remove-role
Удаляет роль пользователя.
Использование
wp user remove-role
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- [{role}]
- A specific role to remove.
Примеры
$ wp user remove-role 12 author Success: Removed 'author' role for johndoe (12).
wp user add-cap
Добавляет возможность пользователю.
Использование
wp user add-cap
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- {cap}
- The capability to add.
Примеры
# Add a capability for a user $ wp user add-cap john create_premium_item Success: Added 'create_premium_item' capability for john (16).
# Add a capability for a user $ wp user add-cap 15 edit_product Success: Added 'edit_product' capability for johndoe (15).
wp user remove-cap
Удаляет возможность пользователя.
Использование
wp user remove-cap
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- {cap}
- The capability to be removed.
Примеры
$ wp user remove-cap 11 publish_newsletters Success: Removed 'publish_newsletters' cap for supervisor (11).
$ wp user remove-cap 11 publish_posts Error: The 'publish_posts' cap for supervisor (11) is inherited from a role.
$ wp user remove-cap 11 nonexistent_cap Error: No such 'nonexistent_cap' cap for supervisor (11).
wp user list-caps
Список всех возможностей пользователя.
Использование
wp user list-caps
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or login.
- [--format={format}]
Render output in a particular format.
По умолчанию: list
Может быть:- list
- table
- csv
- json
- count
- yaml
Примеры
$ wp user list-caps 21 edit_product create_premium_item
wp user import-csv
Импорт пользователей из CSV-файла.
If the user already exists (matching the email address or login), then the user is updated unless the --skip-update flag is used.
Использование
wp user import-csv
Можно указать Глобальные параметры и следующие:
- {file}
- The local or remote CSV file of users to import. If '-', then reads from STDIN.
- [--send-email]
- Send an email to new users with their account details.
- [--skip-update]
- Don't update users that already exist.
Примеры
# Import users from local CSV file $ wp user import-csv /path/to/users.csv Success: bobjones created Success: newuser1 created Success: existinguser created
# Import users from remote CSV file $ wp user import-csv http://example.com/users.csv
Sample users.csv file:
user_login,user_email,display_name,role bobjones,bobjones@example.com,Bob Jones,contributor newuser1,newuser1@example.com,New User,author existinguser,existinguser@example.com,Existing User,administrator
wp user reset-password
Сбрасывает пароль для одного или нескольких пользователей.
Использование
wp user reset-password
Можно указать Глобальные параметры и следующие:
- {user}...
- one or more user logins or IDs.
- [--skip-email]
- Don't send an email notification to the affected user(s).
Примеры
# Reset the password for two users and send them the change email. $ wp user reset-password admin editor Reset password for admin. Reset password for editor. Success: Passwords reset.
wp user spam
Помечает одного или нескольких пользователей как спам.
Использование
wp user spam
Можно указать Глобальные параметры и следующие:
- {id}...
- One or more IDs of users to mark as spam.
Примеры
$ wp user spam 123 User 123 marked as spam. Success: Spamed 1 of 1 users.
wp user unspam
Удаляет одного или нескольких пользователей из спама.
Использование
wp user unspam
Можно указать Глобальные параметры и следующие:
- {id}...
- One or more IDs of users to remove from spam.
Примеры
$ wp user unspam 123 User 123 removed from spam. Success: Unspamed 1 of 1 users.
wp user check-password
Проверяет, действителен ли пароль пользователя.
Использование
wp user check-password
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email or user ID of the user to check credentials for.
- {user_pass}
- A string that contains the plain text password for the user.
Примеры
# Check whether given credentials are valid; exit status 0 if valid, otherwise 1 $ wp user check-password admin adminpass $ echo $? 1
# Bash script for checking whether given credentials are valid or not if ! $(wp user check-password admin adminpass); then notify-send "Invalid Credentials"; fi
wp user meta list
Список всех метаданных, связанных с пользователем.
Использование
wp user meta list
Можно указать Глобальные параметры и следующие:
- {id}
- ID for the object.
- [--keys={keys}]
- Limit output to metadata of specific keys.
- [--fields={fields}]
- Limit the output to specific row fields. Defaults to id,meta_key,meta_value.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- yaml
- count
- [--orderby={fields}]
Set orderby which field.
По умолчанию: id
Может быть:- id
- meta_key
- meta_value
- [--order={order}]
Set ascending or descending order.
По умолчанию: asc
Может быть:- asc
- desc
wp user meta get
Получает значение мета поля.
Использование
wp user meta get
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to get.
- [--format={format}]
Get value in a particular format.
По умолчанию: var_export
Может быть:- var_export
- json
- yaml
wp user meta delete
Удаляет мета-поле.
Использование
wp user meta delete
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- [{key}]
- The name of the meta field to delete.
- [{value}]
- The value to delete. If omitted, all rows with key will deleted.
- [--all]
- Delete all meta for the object.
wp user meta add
Добавляет мета-поле.
Использование
wp user meta add
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to create.
- [{value}]
- The value of the meta field. If omitted, the value is read from STDIN.
- [--format={format}]
The serialization format for the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
wp user meta update
Обновляет мета-поле.
Использование
wp user meta update
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to update.
- [{value}]
- The new value. If omitted, the value is read from STDIN.
- [--format={format}]
The serialization format for the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
Примеры
wp user meta update 40 wp_capabilities '{"administrator":true,"editor":true}' --format=json --url=https://site.loc
NOTE: значение указываем как JSON но оно сохранится как сериализованный массив
wp user meta pluck
Получает вложенное значение из мета-поля (из сериал-го массива).
Использование
wp user meta pluck
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to get.
- {key-path}...
- The name(s) of the keys within the value to locate the value to pluck.
- [--format={format}]
The output format of the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
- yaml
Примеры
Смотрите здесь
wp user meta patch
Обновляет вложенного значения у мета-поля (сериал-го массива).
Использование
wp user meta patch
Можно указать Глобальные параметры и следующие:
- {action}
Patch action to perform.
Может быть:
- insert
- update
- delete
- {id}
- The ID of the object.
- {key}
- The name of the meta field to update.
- {key-path}...
- The name(s) of the keys within the value to locate the value to patch.
- [{value}]
- The new value. If omitted, the value is read from STDIN.
- [--format={format}]
The serialization format for the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
Примеры
Смотрите здесь
wp user term list
Список всех терминов, связанных с юзером.
- {id}
- ID for the object.
- {taxonomy}...
- One or more taxonomies to list.
- [--field={field}]
- Prints the value of a single field for each term.
- [--fields={fields}]
- Limit the output to specific row fields.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- yaml
- count
- ids
Доступные поля
These fields will be displayed by default for each term:
- term_id
- name
- slug
- taxonomy
These fields are optionally available:
- term_taxonomy_id
- description
- term_group
- parent
- count
wp user term remove
Удаление термина у юзера.
Использование
wp user term remove
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {taxonomy}
- The name of the term's taxonomy.
- [{term}...]
- The name of the term or terms to be removed from the object.
- [--by={field}]
Explicitly handle the term value as a slug or id.
Может быть:
- slug
- id
- [--all]
- Remove all terms from the object.
wp user term add
Добавление термина к юзеру.
Append the term to the existing set of terms on the object.
- {id}
- The ID of the object.
- {taxonomy}
- The name of the taxonomy type to be added.
- {term}...
- The slug of the term or terms to be added.
- [--by={field}]
Explicitly handle the term value as a slug or id.
Может быть:
- slug
- id
wp user term set
Задает термины юзера.
Replaces existing terms on the object.
- {id}
- The ID of the object.
- {taxonomy}
- The name of the taxonomy type to be updated.
- {term}...
- The slug of the term or terms to be updated.
- [--by={field}]
Explicitly handle the term value as a slug or id.
Может быть:
- slug
- id
wp user session destroy
Уничтожить сеанс (сессию) указанного юзера.
Использование
wp user session destroy
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- [{token}]
- The token of the session to destroy. Defaults to the most recently created session.
- [--all]
- Destroy all of the user's sessions.
Примеры
# Destroy the most recent session of the given user. $ wp user session destroy admin Success: Destroyed session. 3 sessions remaining.
# Destroy a specific session of the given user. $ wp user session destroy admin e073ad8540a9c2... Success: Destroyed session. 2 sessions remaining.
# Destroy all the sessions of the given user. $ wp user session destroy admin --all Success: Destroyed all sessions.
# Destroy all sessions for all users. $ wp user list --field=ID | xargs -n 1 wp user session destroy --all Success: Destroyed all sessions. Success: Destroyed all sessions.
wp user session list
Список сеансов (сессий) указанного юзера.
Note: The token field does not return the actual token, but a hash of it. The real token is not persisted and can only be found in the corresponding cookies on the client side.
Использование
wp user session list
Можно указать Глобальные параметры и следующие:
- {user}
- User ID, user email, or user login.
- [--fields={fields}]
- Limit the output to specific fields.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- yaml
- count
- ids
Доступные поля
These fields will be displayed by default for each session:
- token
- login_time
- expiration_time
- ip
- ua
These fields are optionally available:
- expiration
- login
Примеры
# List a user's sessions. $ wp user session list admin@example.com --format=csv login_time,expiration_time,ip,ua "2016-01-01 12:34:56","2016-02-01 12:34:56",127.0.0.1,"Mozilla/5.0..."
wp user application-passwords list
Перечисляет все пароли приложений, связанные с пользователем.
Использование
wp user application-passwords list
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to get application passwords for.
- [--{field}={value}]
- Filter the list by a specific field.
- [--field={field}]
- Prints the value of a single field for each application password.
- [--fields={fields}]
- Limit the output to specific fields.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- count
- yaml
- [--orderby={fields}]
Set orderby which field.
По умолчанию: created
Может быть:- uuid
- app_id
- name
- password
- created
- last_used
- last_ip
- [--order={order}]
Set ascending or descending order.
По умолчанию: desc
Может быть:- asc
- desc
Примеры
# List user application passwords and only show app name and password hash $ wp user application-passwords list 123 --fields=name,password +--------+------------------------------------+ | name | password | +--------+------------------------------------+ | myapp | $P$BVGeou1CUot114YohIemgpwxQCzb8O/ | +--------+------------------------------------+
wp user application-passwords get
Получает определенный пароль приложения.
Использование
wp user application-passwords get
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to get the application password for.
- {uuid}
- The universally unique ID of the application password.
- [--field={field}]
- Prints the value of a single field for the application password.
- [--fields={fields}]
- Limit the output to specific fields.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- yaml
Примеры
# Get a specific application password and only show app name and created timestamp $ wp user application-passwords get 123 6633824d-c1d7-4f79-9dd5-4586f734d69e --fields=name,created +--------+------------+ | name | created | +--------+------------+ | myapp | 1638395611 | +--------+------------+
wp user application-passwords create
Создает новый пароль приложения.
Использование
wp user application-passwords create
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to create a new application password for.
- {app-name}
- Unique name of the application to create an application password for.
- [--app-id={app-id}]
- Application ID to attribute to the application password.
- [--porcelain]
- Output just the new password.
Примеры
# Create user application password $ wp user application-passwords create 123 myapp Success: Created application password. Password: ZG1bxdxdzjTwhsY8vK8l1C65
# Only print the password without any chrome $ wp user application-passwords create 123 myapp --porcelain ZG1bxdxdzjTwhsY8vK8l1C65
# Create user application with a custom application ID for internal tracking $ wp user application-passwords create 123 myapp --app-id=42 --porcelain ZG1bxdxdzjTwhsY8vK8l1C65
wp user application-passwords update
Обновляет существующий пароль приложения.
Использование
wp user application-passwords update
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to update the application password for.
- {uuid}
- The universally unique ID of the application password.
- [--{field}={value}]
- Update the
with a new . Currently supported fields: name.
Примеры
# Update an existing application password $ wp user application-passwords update 123 6633824d-c1d7-4f79-9dd5-4586f734d69e --name=newappname Success: Updated application password.
wp user application-passwords record-usage
Запись использования пароля приложения.
Использование
wp user application-passwords record-usage
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to update the application password for.
- {uuid}
- The universally unique ID of the application password.
Примеры
# Record usage of an application password $ wp user application-passwords record-usage 123 6633824d-c1d7-4f79-9dd5-4586f734d69e Success: Recorded application password usage.
wp user application-passwords delete
Удаление существующего пароля приложения.
Использование
wp user application-passwords delete
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to delete the application password for.
- [{uuid}...]
- Comma-separated list of UUIDs of the application passwords to delete.
- [--all]
- Delete all of the user's application password.
Примеры
# Record usage of an application password $ wp user application-passwords record-usage 123 6633824d-c1d7-4f79-9dd5-4586f734d69e Success: Recorded application password usage.
wp user application-passwords exists
Проверяет, существует ли пароль приложения для данного приложения.
Использование
wp user application-passwords exists
Можно указать Глобальные параметры и следующие:
- {user}
- The user login, user email, or user ID of the user to check the existence of an application password for.
- {app-name}
- Name of the application to check the existence of an application password for.
Примеры
# Check if an application password for a given application exists $ wp user application-passwords exists 123 myapp $ echo $? 1
# Bash script for checking whether an application password exists and creating one if not if ! wp user application-password exists 123 myapp; then PASSWORD=$(wp user application-password create 123 myapp --porcelain) fi