Update profile


Update profile

/action/v2/updateprofile

Updates user information. All params can be marked as required.

Requires a form token.

Requires a session token - the user must be logged in.

Supports redirectUrl param of fm:Form component.

The Update Profile action supports many attributes that pertain to the user: user (name), firstname, lastname, address1, among others including Disable Media Notifications (variable: 'disable_media_notifications') and Disable Thread Notifications (variable: 'disable_thread_notifications').
For the description of these attributes, please see the "Supported Attributes" table below.

The User and disable_media_notifications & disable_thread_notifications

The disable_media_notifications setting can be changed in 2 places:

  • by the user in the editprofile template in the "Notify me when someone comments on my media" field: 'Yes' allows the notifications to be sent and 'No' disables them.
    NB: By setting the "Notify me when someone comments on my media" to 'No', the user sets both notifications to "No": disable_media_notifications and disable_thread_notifications.

  • or in the medianotificationoptout page. The medianotificationoptout page can be accessed only from the media notification email, which provides a link to that page (with the user's encrypted credentials)
    so that when the user clicks the link, they are automatically logged in and their Disable Media Notifications setting is set to 1, which disables the media notifications from being sent to that user.

The Administrator and disable_media_notifications & disable_thread_notifications

disable_media_notifications

The disable_media_notifications setting can be managed (for all users) by the administrator via the application's Media Comment Notifications setting in the Project Settings page:
This setting specifies if a system email is sent to the owner of a file that has received a comment.
"Off" means no comment notification emails will be sent, ever.
"Send by default" means that comment notification emails will be sent for all users that have not opted out.
"User must opt-in" means that comment notification emails will only be sent to those that have explicitly opted in. Requires that this option exists in the user profile page.
Comment notification email templates are specified in the channel settings.

disable_thread_notifications

The disable_thread_notifications setting can be managed (for all users) by the administrator via the application's Thread Comment Notifications setting in the Project Settings page:
This setting specifies if a system email is sent to the owner of a file that has received a comment.
"Off" means no comment notification emails will be sent, ever.
"Send by default" means that comment notification emails will be sent for all users that have not opted out.
"User must opt-in" means that comment notification emails will only be sent to those that have explicitly opted in. Requires that this option exists in the user profile page.
Comment notification email templates are specified in the channel settings.

Example

<fm:Form action="/action/v2/updateprofile" method="post"> <fm:Form_Username name="user" /> <fm:Form_Password name="password" /> <fm:Form_TextInput name="firstname" /> <fm:Form_TextInput name="lastname" /> <fm:Form_TextInput name="address1" /> <fm:Form_TextInput name="city" /> <fm:Form_TextInput name="state" /> <fm:Form_TextInput name="country" /> <fm:Form_TextInput name="groupids" /> <fm:If value="{$$media_notifications_default}" comparison="gt" compareTo="0" > <li class="label"><label for="DisableMediaNotifications">{%forms:receiveMediaNotifications}</label><br /> <select class="disable_media_notifications fmSelect" name="disable_media_notifications"> <option value="0" <fm:Switch value="{$$loggedinuser.disable_media_notifications}"><fm:Case value="0">selected="selected"</fm:Case></fm:Switch> >Yes</option> <option value="1" <fm:Switch value="{$$loggedinuser.disable_media_notifications}"><fm:Case value="1">selected="selected"</fm:Case></fm:Switch> >No</option> </select> </li> </fm:If> <fm:Form_Custom><button type="submit">Update Profile</button></fm:Form_Custom> </fm:Form>

Supported Attributes

Name Required Description
user Optional Username. Can only contain alphanumeric chars, underscore and dash. Must be between 6 and 40 characters long.
password Optional Password of the user. Must be between 6 and 40 characters long.
email Optional Must be a valid email. Limited to 100 characters
firstname Optional Must be alpha chars, limited to 40.
lastname Optional Must be alpha chars, limited to 40.
address1 Optional User's address. Limited to 80 chars.
address2 Optional Additional address space. Limited to 80 chars.
city Optional User's city. Limited to 100 chars.
state Optional User's state/province. Must be a state or province code (2 chars)
country Optional User's country. Limited to 40 alpha chars.
postalcode Optional User's postal/zip code. Limited to 10 chars, alphanumeric and space are allowed.
gender Optional User's gender. Valid values: "M" or "F"
birthdate Optional User's birth date. Must be a date format (YYYY-MM-DD). Use component to draw the select boxes
phone Optional User's phone number. Limited to 15 chars.
cellphone Optional User's cellphone number. Limited to 15 chars.
website Optional User's website. Must be a valid url. Limited to 100 chars.
occupation Optional User's occupation. Limited to 30 chars.
description Optional User's description (about me). Limited to 65535 chars
groupids Optional An integer or list (comma separated string) of groups that you want to add the user to.
geo_latitude Optional Latitude of the user's location. Must be a latitude coordinate of type double (e.g. 43.6457276560286)
geo_longitude Optional Longitude of the user's location. Must be a longitude coordinate of type double (e.g. -79.4485116004944)
loggedinuser.disable_media_notifications Optional (Integer) 0 or 1 - Disables the media notification emails from being sent to the user that is logged in: 0 allows the notifications to be sent, 1 disables the email notifications. Can also be changed by clicking the "OPT OUT FROM THE NOTIFICATIONS" link on the bottom of each "media notification email".
loggedinuser.disable_tread_notifications Optional (Integer) 0 or 1 - Disables the thread notification emails from being sent to the user that is logged in: 0 allows the notifications to be sent, 1 disables the email notifications. Can also be changed by clicking the "OPT OUT FROM THE NOTIFICATIONS" link on the bottom of each "thread notification email".