Skip to contents

Initializes a `MainAccount` object and saves it using the configured backend.

Usage

create_user_account_base(
  user_id,
  base_dir = Sys.getenv("ACCOUNT_BASE_DIR", "user_accounts"),
  initial_balance = 0
)

Arguments

user_id

A validated user ID (must contain only letters, digits, and underscores).

base_dir

Deprecated. Use ACCOUNT_BACKEND instead.

initial_balance

Optional numeric value specifying the starting balance for the main account. Default is `0`.

Value

Invisibly returns `TRUE` if the account was created successfully.