You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/pages/6.0/10.users/01.user-accounts/docs.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: User Accounts
3
3
description: UserFrosting ships with everything you need to create user accounts, and a rich set of features for users and administrators.
4
-
wip: true
5
4
---
6
5
7
6
You were probably attracted to UserFrosting because you wanted to "make a site where users can sign in", or you already have a project in progress and your boss asked you to "put it behind a login," or you need to have some "protected pages." These are nontechnical terms. It will be easier for us to communicate if we first establish a common vocabulary, so that we can explain the concepts with more precision.
@@ -62,6 +61,7 @@ UserFrosting comes with two built-in mechanisms for creating new accounts: publi
62
61
63
62
In many instances, you will want people to be able to register for your website or application through a publicly accessible page. By default, the registration form is available at `/account/register`.
When the registration form is submitted, it will `POST` to the `/account/register` endpoint (which invokes the `RegisterAction` method).
@@ -89,16 +89,19 @@ To disable this behavior, set the `site.registration.require_email_verification`
89
89
90
90
Sometimes, you want to have a site administrator create an account on behalf of a specific user. For some applications, you may want this to be the _only_ way that new accounts can be created. To create a new user as an administrator, use the "create user" button at the bottom of the main user listing page:
You can then fill out details for the user. After you create the user, an email will be automatically sent to them that allows them to set their own password.
95
96
97
+
<!-- TODO : Update image -->
96
98

97
99
98
100
## Login form
99
101
100
102
By default, the login form is available at `/account/sign-in`. The user provides their email or username as their identity, along with their password. The form is submitted to `/account/login`, which invokes `LoginAction`. This processes the authentication request.
101
103
104
+
<!-- TODO : Update image -->
102
105

103
106
104
107
The `/account/login` route is throttled via the `throttles.sign_in_attempt` throttle rule. This mitigates against the possibility of brute-force attempts to guess your users' passwords.
@@ -123,6 +126,7 @@ After the page containing the sign-in form receives a response from the server t
123
126
124
127
Users can reset their passwords by visiting `/account/forgot-password`. They will be asked for their account email address:
125
128
129
+
<!-- TODO : Update image -->
126
130

127
131
128
132
Upon submitting a password reset request, a secret token will be issued for the user's account (stored in `password_resets` table), and emailed to them in the form of a link (`/account/set-password/confirm`). The link will take them to a form with the secret token embedded in the page, where they can set their new password. The form is then submitted to `/account/set-password`, which updates the user's password and signs them in.
@@ -143,6 +147,7 @@ For the precise implementation of the password reset and account verification re
143
147
144
148
Users can update certain attributes of their accounts through the account settings/profile page. By default, this is available at `/account/settings`:
As a security measure, users are required to verify their current password before they can update their email address or password. Other fields, like name and locale, do not require the authenticated user to re-enter their password.
@@ -194,6 +199,7 @@ Basic user details (name, email, locale, group) can be modified via the "Edit us
194
199
195
200
Roles can be added to or removed from a user account via the `Manage roles` button on the user's profile page, or in the dropdown menu in the user table.
196
201
202
+
<!-- TODO : Update image -->
197
203

198
204
199
205
By default, only the root account can change users' roles. You may want to modify this to allow site admins to grant a **subset** of the available roles to other users - but be careful! You may not want site administrators to be allowed to elevate other users to site administrator, for example. See the section on [access control](/users/access-control) for more information.
@@ -202,6 +208,7 @@ By default, only the root account can change users' roles. You may want to modif
202
208
203
209
Administrators may be able to perform a password reset on behalf of users. This is useful, for example, when you have users who have difficulty with the self-service password reset tool. Password resets can be performed via the "Password" button in the user's profile page, or the "change password" option in the dropdown menu of the user table.
You may send a password reset link to the user so that they can change it themselves, or even set a password directly when dealing with particularly technology-adverse users over the phone.
Copy file name to clipboardExpand all lines: app/pages/6.0/10.users/02.access-control/docs.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Authorization
3
3
description: Authorization is sometimes referred to as "access control" or "protecting pages". UserFrosting implements an extended version of role-based access control that supports procedural conditions on user permissions.
4
-
wip: true
5
4
---
6
5
7
6
Authenticating users (knowing who they are) is only half the battle. The harder question is: **what should each user be allowed to do?** Not every user should access administrative features, delete data, or view sensitive information. Without proper authorization, your application becomes either a security hole (everyone can do everything) or a maintenance nightmare (hardcoded permissions scattered everywhere).
Copy file name to clipboardExpand all lines: app/pages/6.0/10.users/03.groups/docs.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Groups
3
3
description: Unlike roles, which assign specific sets of permissions to users, user groups allow you to horizontally partition your users.
4
-
wip: true
5
4
---
6
5
7
6
Every user can belong to **exactly one group**. Groups are used to horizontally partition your users - for example, if you have offices in Baltimore, London, and Munich, you might want to group your users according to which office they are in. Group membership can be used to broadly determine styling, layout, or access control for all users in the group.
Copy file name to clipboardExpand all lines: app/pages/6.0/10.users/04.activity-logging/docs.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Activity Logging
3
3
description: The activity logger allows you to capture and log user activities. By default this information is sent to the database, but you can use Monolog to customize how this information is stored - even having critical activity alerts sent to an administrator!
4
-
wip: true
5
4
---
6
5
7
6
By default, user activities are logged to the `activities` database table. Logged information includes the activity time and an activity type, the `user_id`, the user's IP address, and a description of the activity. The administrative interface provides convenient tables for viewing these logs:
@@ -16,20 +15,23 @@ The following activity types are logged by the core UserFrosting features:
16
15
|---------------|-------------|
17
16
|`sign_up`| The user signed up via the public registration page. |
18
17
|`sign_in`| The user signed in to their account. |
18
+
|`sign_out`| The user explicitly signed out of their account (note, this does not capture when a user's session expires on its own). |
19
+
|`verified`| The user verified their email address. |
20
+
|`password_reset`| The user reset their password. |
21
+
|`password_upgraded`| The user's password hash was automatically upgraded to modern hashing. |
19
22
|`update_profile_settings`| The user updated their profile settings (name, locale, etc). |
20
23
|`update_account_settings`| The user updated their account settings (email or password). |
21
-
|`sign_out`| The user explicitly signed out of their account (note, this does not capture when a user's session expires on its own). |
22
24
|`group_create`| The user created a new group. |
23
25
|`group_delete`| The user deleted a group. |
24
-
|`group_update_info`| The user updated information for a group. |
26
+
|`group_update_info`| The user updated the details of a group. |
25
27
|`role_create`| The user created a new role. |
26
28
|`role_delete`| The user deleted a role. |
27
-
|`role_update_info`| The user updated general information for a role. |
29
+
|`role_update_info`| The user updated the details of a role. |
28
30
|`role_update_field`| The user updated a specific attribute of a role (this includes modifying the permissions for a role). |
29
31
|`account_create`| The user created an account for another user. |
30
32
|`account_delete`| The user deleted another user's account. |
31
-
|`account_update_info`| The user updated general account info (name, locale, etc) for another user. |
32
-
|`account_update_field`| The user updated a specific field for another user (this includes modifying a user's roles or password, and enabling/disabling their account). |
33
+
|`account_update_info`| The user updated basic account info for another user (name, email, locale, group). |
34
+
|`account_update_field`| The user updated a specific field for another user account (e.g., enabled/disabled status, verification status, password, roles). |
33
35
34
36
> [!NOTE]
35
37
> These activities are only logged _when successful_. If a user is unable to perform one of these activities, for example because they don't have the necessary permissions or there is some other problem, the attempt won't be logged.
0 commit comments