> For the complete documentation index, see [llms.txt](https://gift.icbest.ca/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gift.icbest.ca/giftmanager-docs/pages-and-functions/add-user.md).

# Add User

**Logic**:

* Extract required fields (username, password, full name, birthday) from the POST request.
* Extract optional fields (email, avatar) using `request.form.get`.
* Hash the plain text password into an SHA-1 string and save it in the JSON.
* Write the new data to the JSON file.

**Frontend**:

* Four mandatory fields: username (for login), password, full name, birthday (not currently used).
* Optional email field (used for email notifications).
* Avatar selection: choose from six avatars, replace files in `static/icons` with appropriately named PNG files (`avatar1.png`, `avatar2.png`, etc.) if you want different ones.
