b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Advanced Topics
  3. Using the APIs
  4. REST API or RESTful API
  5. 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

The request user fields

Name

Type

Description

Required?

Default

edited_user_login

string

User login

yes

identity_form

boolean

true/1 to update the fields below:

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; M - Male, F - Female

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

true/1 to update the fields below:

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

true/1 to update the fields below:

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: default - Use default duration, custom - Use custom duration

no

timeout_sessions_value

integer

Custom duration value

no

timeout_sessions_name

string

Custom duration name: second, minute, hour, day, month, year

no

edited_user_showonline

integer

Show online

no

subscriptions_form

boolean

true/1 to update the fields below:

no

false

edited_user_email

string

Email address

yes

edited_user_email_format

string

Email format:

  • auto - Automatic (HTML + Plain text)
  • html - HTML
  • text - Plain text

no

auto

PM

integer

Other users can send to user private messages on this site.

no

0

email

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_collection_ID

integer

Set 1 to subscribe on ALL items of the collection with ID = collection_ID

no

0

sub_comments_collection_ID

integer

Set 1 to subscribe on ALL comments of the collection with ID = collection_ID

no

0

subs_item_IDs

string

Item IDs to individual subscriptions. A string list separated by comma ,.

yes

item_sub_item_ID

integer

Set 1 to UNsubscribe from the item with ID = item_ID

no

0

admin_form

boolean

true/1 to update the fields below:

no

false

edited_user_status

string

Account status: new, activated, autoactivated, emailchanged, deactivated, failedactivation, closed

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: unknown, redemption, warning, suspicious1, suspicious2, suspicious3, prmerror, spammer

no

notification_sender_email

string

Sender email address

yes

notification_sender_name

string

Sender name

yes

edited_iprange_status

string

IP range status: trusted, ` - Unknown,suspect,blocked`

no

edited_domain_status

string

Domain status: trusted, ` - Unknown,suspect,blocked`

no

edited_user_source

string

Source link/code

yes

edited_initial_referer_status

string

Initial referer status: trusted, ` - Unknown,suspect,blocked`

no

account_close_reason

multiline string

Account close reason

no

Messages / Errors

Possible Message/Error Codes

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:

  • Please enter your login.
  • This login already exists.
  • Please enter your e-mail address.
  • You must be at least %d years old to use this service.
  • etc.

update_success

200

Profile has been updated.

update_success

200

Password has been changed.

Created by yurabakhtin • Last edit by yurabakhtin on 2018-10-12 10:51 • •

No feedback yet

On this page

  • Parameters
  • Messages / Errors

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
    • Using Desktop Blogging Tools
    • Using Blogging Apps
    • Blogging by email
    • Using the APIs
      • REST API or RESTful API
        • List Collections (REST)
        • List Posts (REST)
        • List Items (REST)
        • Retrieve a Post (REST)
        • Retrieve any item (REST)
        • Search (REST)
        • List Users (REST)
        • Retrieve a User (REST)
        • Create a User (REST)
        • Update a User (REST)
        • Delete a User (REST)
        • Cookie Authentication (REST)
        • Basic HTTP Authentication (REST)
      • B2 API
      • API Error Codes
      • Blogger API
      • MetaWeblog API
      • MovableType API
    • Contributing
    • Translations (i18n/l10n)
    • Monetizing
    • How to...
    • Podcasting
  • Glossary
  • Archives
Social CMS software

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque