1 user.entity.inc public UserStorageController::create(array $values)

Overrides EntityDatabaseStorageController::create().

Overrides EntityDatabaseStorageController::create

File

core/modules/user/user.entity.inc, line 330
Entity classes and controllers for User module.

Class

UserStorageController
Controller class for users.

Code

public function create(array $values) {
  if (!isset($values['created'])) {
    $values['created'] = REQUEST_TIME;
  }
  $values['changed'] = REQUEST_TIME;

  // Users always have the authenticated user role.
  $values['roles'][] = BACKDROP_AUTHENTICATED_ROLE;

  return parent::create($values);
}