Zabbix Documentation 3.4

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:api:reference:user:updateprofile

user.updateprofile

Description

object user.updateprofile(object parameters)

This method allows to update the currently logged in user.

This method is deprecated and will be removed in the future. Please use user.update instead.

Parameters

(object/array) User properties to be updated.

The userid property must not be defined. Only the passed properties will be updated, all others will remain unchanged.

Additionally to the standard user properties, the method accepts the following parameters.

Parameter Type Description
passwd string User's password.
usrgrps array User groups to replace existing user groups.

The user groups must have the usrgrpid property defined.

Return values

(object) Returns an object containing the ID of the updated user under the userids property.

Examples

Renaming the current user

Rename the current user to John Doe.

Request:

{
    "jsonrpc": "2.0",
    "method": "user.updateprofile",
    "params": {
        "name": "John",
        "lastname": "Doe"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}

Response:

{
    "jsonrpc": "2.0",
    "result": {
        "userids": [
            "1"
        ]
    },
    "id": 1
}

See also

Source

CUser::update() in frontends/php/include/classes/api/services/CUser.php.