> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/staff/users.md).

# Users

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: web. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/staff/users.md).
{% endhint %}

Staff search every Snapfix user, change their names, type and flags, delete them, reset their passwords, create temporary passwords, and see the groups each one belongs to.

* **Where:** admin app `/users`; menu "Users". The Group Users page opens `/users?id=<user ID>` from a user's row (webadmin\_angular @ db972390b8, `src/app/pages/group-users/group-users.component.ts:229-231`). With an ID, the page shows the "UUID" column, includes deleted users and searches for that ID. When exactly one user matches, "Edit User" opens at once and the address becomes `/users`.
* **Who:** any signed-in staff user. The route checks only that a session exists. The user list checks no staff flag, and the password reset checks no relation between the caller and the user. Only the temporary password checks that the caller is staff, reading the caller from the token without checking its signature.
* **Feature:** [Customer administration](https://docs.snapfix.com/product/features/staff/customer-admin.md)

## Layout

1. The title "Users". At the right, "Add/Remove columns" with a round button that opens "Show Columns", and below it the "Include Deleted" switch.
2. The table, paged on the server: 10 rows by default, with 10, 20, 50 or 100 per page and a page jump. With no sort chosen the server lists the newest users first. Deleted users' rows are marked as deleted.

Columns shown by default: "Username", "Mobile Number", "Name", "First Name", "Last Name", "Business Count", "Registration time", "Registration Origin", "Notes" and "Action". Hidden until chosen in "Show Columns": "UUID", "Country Code", "Address", "Staff username", "Email Verified", "Mobile Verified", "Logging", "Fast Login Process", "Red Dot Alert" and "Registered".

* "Business Count" is the number of the user's live group memberships, memberships of deleted groups and sites included.
* "Registration time" is shown as "MM/dd/YYYY HH:mm:ss".
* "Notes" holds the staff notes on the user. The flag columns, "Email Verified" to "Registered", show "Yes" or "No".
* "Action" has four round buttons: "Edit", "View Business/Group Details" (disabled for a user with no memberships), "Reset password" and "Temp Password".

## Inputs

| Field                                                                                                  | Type                                | Required | Default                                 | Rules and messages                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------- | -------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Column search ("UUID", "Username", "Country Code", "Mobile Number", "Name", "First Name", "Last Name") | Text, from the column's search icon | No       | Empty                                   | "Search" and "Reset", as on [SMS/E-mail delivery](https://docs.snapfix.com/how-the-apps-work/screens/staff/sms-email-delivery.md#inputs); Enter also searches. The trimmed text goes to the server as a contains-match that ignores case. Searches on several columns apply together, and a new search goes back to page 1. "Reset" clears the column's search. |
| Include Deleted                                                                                        | Switch                              | No       | Off (on when the page opens with an ID) | Off sends `fDeleted` `0`, so deleted users are left out. Changing it reloads the current page.                                                                                                                                                                                                                                                                  |
| Show Columns                                                                                           | Checkboxes                          | No       | The defaults above                      | Shows or hides a column at once. The choice lasts only while the page is open.                                                                                                                                                                                                                                                                                  |

## Actions

| Action                        | Who   | What happens                                                                                                                                                                                                                                                                                           | API                                                                                                                                |
| ----------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| Load the list                 | Staff | Loads a page with the sort, the searches and the deleted setting. A request identical to the one before is not sent again.                                                                                                                                                                             | [`GET /v4/users`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-v4users)                                         |
| Sort                          | Staff | Sorts on "Name", "First Name" or "Last Name", on the server.                                                                                                                                                                                                                                           | [`GET /v4/users`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-v4users)                                         |
| "Edit"                        | Staff | Opens [Edit User](#edit-user).                                                                                                                                                                                                                                                                         | See the dialog                                                                                                                     |
| "View Business/Group Details" | Staff | Opens [Business/Group list](#businessgroup-list) from the row's data, with no request.                                                                                                                                                                                                                 | None                                                                                                                               |
| "Reset password"              | Staff | Opens [Reset Password](#reset-password).                                                                                                                                                                                                                                                               | See the dialog                                                                                                                     |
| "Temp Password"               | Staff | Creates a temporary password, valid for one sign-in within 10 minutes; the server keeps only its hash. The app copies it to the clipboard and shows "Temp Password: copied to Clipboard". Every row's "Temp Password" button is disabled while one request runs. A failure shows the server's message. | [`POST ?action=create_temp_password`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actioncreate_temp_password) |

## States

* **Loading:** the table shows its loading state.
* **Empty:** the table's empty placeholder, seen only when nothing has loaded yet, for example an ID from the link that matches no user.
* **No match:** the API answers a page with no users with HTTP 500 instead of an empty list ([`GET /v4/users`](https://docs.snapfix.com/engineering-reference/api/staff.md#get-v4users)), so a search that matches nothing keeps the rows of the list before, with the search marked active and no message.
* **Error:** the list shows no error message. An answer that is not a success empties the table; a failed request keeps the rows shown before.
* **No permission:** none in the app.

## Dialogs and sheets

### Edit User

"Edit User", 820 px wide.

| Field                                                                      | Type                                 | Required | Default                      | Rules and messages                                                                                                                                                                                                                            |
| -------------------------------------------------------------------------- | ------------------------------------ | -------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Email                                                                      | Text                                 | No       | The user's email             | Read-only.                                                                                                                                                                                                                                    |
| Mobile Number                                                              | Country code and number              | No       | The user's values            | Read-only.                                                                                                                                                                                                                                    |
| Staff Username                                                             | Text                                 | No       | The user's value             | Read-only.                                                                                                                                                                                                                                    |
| First Name                                                                 | Text                                 | Yes      | The user's value             | "Save" is disabled while it is empty.                                                                                                                                                                                                         |
| Last Name                                                                  | Text                                 | Yes      | The user's value             | "Save" is disabled while it is empty.                                                                                                                                                                                                         |
| \[Legacy] Name                                                             | Text                                 | No       | The user's value             | Read-only.                                                                                                                                                                                                                                    |
| Address                                                                    | Text                                 | No       | The user's value             |                                                                                                                                                                                                                                               |
| User Type                                                                  | Select                               | Yes      | The user's type, or "Normal" | "Normal", "Snapfix" or "Snapfix Test". The app does not say what the Snapfix types do \[[ASK-222](https://github.com/snapfix/docs/blob/main/ASK.md#ask-222-what-are-the-snapfix-user-types-for-and-who-may-set-them-and-the-verified-flags)]. |
| Email Verified                                                             | Checkbox                             | No       | The user's value             | Disabled when the user has no email.                                                                                                                                                                                                          |
| Mobile Verified                                                            | Checkbox                             | No       | The user's value             | Disabled unless the user has both a country code and a number.                                                                                                                                                                                |
| Logging, Fast Login Process, \[Legacy] Red Dot Alert, \[Legacy] Registered | Checkboxes under "Developer Setting" | No       | The user's values            |                                                                                                                                                                                                                                               |
| Delete                                                                     | Checkbox, in the footer              | No       | Ticked for a deleted user    | Ticking it first asks "Deleting a user is usually carried out by the customer." and "Are you sure it's safe to delete this user?", with "Delete". Clicking a ticked box clears it without a question.                                         |

"Origin: " shows below the flags when the user has a registration origin.

| Action   | Who   | What happens                                                                                                                                                                                                                                                                                                                                                                                                                              | API                                                                                                                                     |
| -------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| "Save"   | Staff | Sends the first and last names, the name as both joined with a space, the address, the flags, the user type and the Delete box as `fDeleted`, so a ticked box marks the user deleted and a cleared one sends the user as not deleted. On success "Success" shows, the dialog closes and the list reloads; a deleted user stays listed only while "Include Deleted" is on. A failure shows the server's message and the dialog stays open. | `?action=save_pri_user_v7` in the [Users API](https://docs.snapfix.com/engineering-reference/api/users.md), which has no section for it |
| "Cancel" | Staff | Closes. Disabled while saving, as are the close button and a click outside.                                                                                                                                                                                                                                                                                                                                                               | None                                                                                                                                    |

### Reset Password

"Reset Password", 820 px wide. The [Group users](https://docs.snapfix.com/how-the-apps-work/screens/staff/group-users.md) page opens the same dialog.

* Left: the user's details, read-only: "Email -", "Mobile -", "Staff Username -", "First Name -", "Last Name -", "\[Legacy] Name -" and "Address -".
* Right: "New Password" (required), a plain text field, so the password shows as typed, and "Generate", which fills in 10 random upper and lower case letters and digits. The app checks no password rule, and neither does the server.

| Action   | Who   | What happens                                                                                                                                                                                                                                                               | API                                                                                                                                          |
| -------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| "Reset"  | Staff | Disabled while the field is empty. Sets the password at once, as typed, with no confirmation. On success "Success" shows and the dialog closes; a failure shows the server's message. The server action takes any signed-in caller and writes the new password into a log. | [`POST ?action=admin_reset_user_password`](https://docs.snapfix.com/engineering-reference/api/staff.md#post-actionadmin_reset_user_password) |
| "Cancel" | Staff | Closes, even while the reset runs; only the close button and a click outside are disabled then.                                                                                                                                                                            | None                                                                                                                                         |

### Business/Group list

"Business/Group list of" and the user's username, 820 px wide. Without a username the title uses the country code and mobile number even when both are empty, so a user with neither shows "null null"; the code's fallback to the name runs only for a username of spaces (`src/app/pages/users/users.component.ts:156-162`). The title is passed to the dialog as HTML.

A tree of the user's sites, the first one open, each with its groups below it. Each group shows its name and the user's role in brackets, "user" when none is set. Deleted sites and groups are red.

| Action                        | Who   | What happens                                                                                                                                                                                         | API  |
| ----------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| "Business Groups" (on a site) | Staff | Opens the [Groups](https://docs.snapfix.com/how-the-apps-work/screens/staff/groups.md) page for that site, with the site's name in the address, and closes the dialog.                               | None |
| "Group Users" (on a group)    | Staff | Opens the [Group users](https://docs.snapfix.com/how-the-apps-work/screens/staff/group-users.md) page for that group, with the site's name and the group's ID in the address, and closes the dialog. | None |
| "Cancel"                      | Staff | Closes.                                                                                                                                                                                              | None |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/staff/users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
