- b2evolution CMS User Manual
- Advanced Topics
- Using the APIs
- REST API or RESTful API
- Update a User (REST)
Update a User (REST)
POST <baseurl>/api/v1/users/<id>
This API end-point allows to update a User account. It is the equivalent of the back-office feature: Editing a User Account.
Parameters
Name |
Type |
Description |
Required? |
Default |
---|---|---|---|---|
edited_user_login |
string |
User login |
yes |
|
identity_form |
boolean |
|
no |
false |
edited_user_firstname |
string |
First name |
Depending on setting "Firstname", see User Latitude Panel |
|
edited_user_lastname |
string |
Last name |
Depending on setting "Lastname", see User Latitude Panel |
|
edited_user_nickname |
string |
Nickname |
Depending on setting "Nickname", see User Latitude Panel |
|
edited_user_gender |
string |
Gender; |
Depending on setting "Gender", see Options for All Registration Methods Panel |
|
edited_user_ctry_ID |
integer |
Country ID |
Depending on setting "Country", see User Latitude Panel |
|
edited_user_rgn_ID |
integer |
Region ID |
Depending on setting "Region", see User Latitude Panel |
|
edited_user_subrg_ID |
integer |
Sub-region ID |
Depending on setting "Sub-region", see User Latitude Panel |
|
edited_user_city_ID |
integer |
City ID |
Depending on setting "City", see User Latitude Panel |
|
edited_user_age_min |
integer |
Minimum age group |
no |
|
edited_user_age_max |
integer |
Maximum age group |
no |
|
organizations[] |
array |
Array of organization IDs |
no |
|
org_roles[] |
array |
Array of organization roles |
no |
|
password_form |
boolean |
|
no |
false |
current_user_pass |
string |
Current password. If you are logged as admin/moderator (you have a permission to edit other users) then you should use your own current password here and not current password of the edited user. |
yes |
|
edited_user_pass1 |
string |
New password |
yes |
|
edited_user_pass2 |
string |
Confirm new password |
yes |
|
preferences_form |
boolean |
|
no |
false |
edited_user_locale |
string |
Preferred locale |
yes |
|
edited_user_set_login_multiple_sessions |
integer |
Multiple sessions |
no |
0 |
edited_user_timeout_sessions |
string |
Session timeout: |
no |
|
timeout_sessions_value |
integer |
Custom duration value |
no |
|
timeout_sessions_name |
string |
Custom duration name: |
no |
|
edited_user_showonline |
integer |
Show online |
no |
|
subscriptions_form |
boolean |
|
no |
false |
edited_user_email |
string |
Email address |
yes |
|
edited_user_email_format |
string |
Email format:
|
no |
auto |
PM |
integer |
Other users can send to user private messages on this site. |
no |
0 |
|
integer |
Other users can send to user emails through a message form that will NOT reveal my email address. |
no |
0 |
edited_user_notify_messages |
integer |
Notify user by email whenever user receives a private message. |
no |
0 |
edited_user_notify_unread_messages |
integer |
Notify user by email whenever user has unread private messages for more than X days. |
no |
0 |
edited_user_notify_publ_comments |
integer |
Notify user by email whenever a comment is published on one of user posts. |
no |
0 |
edited_user_notify_cmt_moderation |
integer |
Notify user by email whenever a comment is posted and user has permissions to moderate it. |
no |
0 |
edited_user_notify_meta_comments |
integer |
Notify user by email whenever a meta comment is posted. |
no |
0 |
edited_user_send_cmt_moderation_reminder |
integer |
Notify user by email whenever comments are awaiting moderation for more than X days. |
no |
0 |
edited_user_notify_post_moderation |
integer |
Notify user by email whenever a post is created and user has permissions to moderate it. |
no |
0 |
edited_user_send_pst_moderation_reminder |
integer |
Notify user by email whenever posts are awaiting moderation for more than X days. |
no |
0 |
edited_user_send_activation_reminder |
integer |
Notify user by email whenever user account was deactivated or is not activated for more than X days. |
no |
0 |
edited_user_notify_new_user_registration |
integer |
Notify user by email whenever a new user has registered. |
no |
0 |
edited_user_notify_activated_account |
integer |
Notify user by email whenever an account was activated. |
no |
0 |
edited_user_notify_closed_account |
integer |
Notify user by email whenever an account was closed. |
no |
0 |
edited_user_notify_reported_account |
integer |
Notify user by email whenever an account was reported. |
no |
0 |
edited_user_notify_changed_account |
integer |
Notify user by email whenever an account was changed. |
no |
0 |
edited_user_notify_cronjob_error |
integer |
Notify user by email whenever a scheduled task ends with an error or timeout. |
no |
0 |
edited_user_notification_email_limit |
integer |
Limit notifications to X emails per day. Min value is 0, Max - 999. |
no |
0 |
edited_user_newsletter_news |
integer |
Send user news about this site. |
no |
0 |
edited_user_newsletter_ads |
integer |
User want to receive ADs that may be relevant to his interests. |
no |
0 |
edited_user_newsletter_limit |
integer |
Limit newsletters to X emails per day. Min value is 0, Max - 999. |
no |
0 |
subs_blog_IDs |
string |
Collection IDs to subscribe. A string list separated by comma |
yes |
|
sub_items_ |
integer |
Set |
no |
0 |
sub_comments_ |
integer |
Set |
no |
0 |
subs_item_IDs |
string |
Item IDs to individual subscriptions. A string list separated by comma |
yes |
|
item_sub_ |
integer |
Set |
no |
0 |
admin_form |
boolean |
|
no |
false |
edited_user_status |
string |
Account status: |
yes |
|
edited_user_grp_ID |
integer |
Primary user group ID |
yes |
|
edited_user_secondary_grp_ID[] |
array of integers |
Secondary user groups IDs |
no |
|
edited_user_level |
integer |
User level; min - 0, max - 10 |
yes |
|
edited_user_email |
string |
Email address |
yes |
|
edited_email_status |
string |
Email status: |
no |
|
notification_sender_email |
string |
Sender email address |
yes |
|
notification_sender_name |
string |
Sender name |
yes |
|
edited_iprange_status |
string |
IP range status: |
no |
|
edited_domain_status |
string |
Domain status: |
no |
|
edited_user_source |
string |
Source link/code |
yes |
|
edited_initial_referer_status |
string |
Initial referer status: |
no |
|
account_close_reason |
multiline string |
Account close reason |
no |
Messages / Errors
Error code |
HTTP response |
Message |
---|---|---|
no_access |
403 |
You are not logged in. |
user_invalid_id |
404 |
Invalid user ID |
no_access |
403 |
You have no permission to edit other users! |
update_failed |
403 |
Many different errors on wrong entered user fields, such as:
|
update_success |
200 |
Profile has been updated. |
update_success |
200 |
Password has been changed. |