На странице
user.resettotp
Описание
object user.resettotp(объект/массив users)
Этот метод позволяет сбросить TOTP-секреты пользователя.
Этот метод доступен только пользователю с типом доступа Супер-администратор. Разрешения на вызов метода можно отозвать в настройках ролей пользователя. Дополнительную информацию см. в разделе Роли пользователей.
Parameters
(array) IDs of users for which to reset TOTP secrets.
User sessions for the specified users will also be deleted (except for the user sending the request).
Return values
(object) Returns an object containing the IDs of the users for which TOTP secrets have been reset, under the userids property.
Примеры
Resetting TOTP secrets for multiple users
Reset TOTP secrets for two users.
{
"jsonrpc": "2.0",
"method": "user.resettotp",
"params": [
"1",
"5"
],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"userids": [
"1",
"5"
]
},
"id": 1
}
See also
Source
CUser::resettotp() in ui/include/classes/api/services/CUser.php.