5.1. InitUser: Create a user account.

InitUser(username string, password string) (userdataptr *User, err error)

Creates a new User struct and returns a pointer to it.

The User struct should include all data required by the client to operate on behalf of the user.

Returns an error if:

  • a user with the same username already exists.

Parameters
  • username (string) – Username

  • password (string) – Password

Return type

userdataptr, error

Warning

Do not forget that your design must satisfy all requirements, including:

  1. The client application must not use the local filesystem (see No Persistent Local State).

  2. Users can have multiple active user sessions at once (see User Sessions).