$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();

}

Is something missing or incorrect? Edit this page on Github…