1 user.module user_save($account)

Save a new or updated user.

Parameters

User $account: The user entity object to add or modify.

Return value

int: Either SAVED_NEW or SAVED_UPDATED depending on the operation performed.

See also

entity_create()

user_load()

File

core/modules/user/user.module, line 341
Enables the user registration and login system.

Code

function user_save($account) {
  return $account->save();
}