$user->update($data = array())

Updates the user account information.

  • return ($user)

Example

try {

  $site->user('bastian')->update(array(
    'email'     => 'bastian@getkirby.com',
    'firstName' => 'Bastian',
    'lastName'  => 'Allgeier'
  ));

  echo 'The user has been updated';

} catch(Exception $e) {

  echo 'The user could not be updated';
  // optional reason: echo $e->getMessage();

}