_set

Sets the value of a specified property of a specified User.

Parameters

id

The ID of the User.

name

The name of the property to change.

Accepted names:

  • 'address',

  • 'bgcolour',

  • 'cost_per_hour',

  • 'date_of_birth',

  • 'hours_per_week',

  • 'name',

  • 'phone_mobile',

  • 'phone_landline',

  • 'price_per_hour',

  • 'password',

  • 'vehicle_id'.

val

The new value of the property.

Example

FM_api('User_set', ['id' => '123', 'name' => 'cost_per_hour', 'val' => '210.50']);

Result

On Success

{'ok':1}

On Failure

{'error':'unknown variable name'}

Last updated