Skip to content

Commit 3522c32

Browse files
committed
IBX-8823: Manage user data from CLI
1 parent ae70b1d commit 3522c32

File tree

4 files changed

+58
-7
lines changed

4 files changed

+58
-7
lines changed

docs/users/invitations.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,24 @@
22
description: Manage user invitations to create an account in the frontend or the Back Office.
33
---
44

5-
# Inviting users
5+
# Invite users
66

77
[[= product_name =]] allows you to create and send invitations to create an account in
8-
the frontend as a customer, the Back Office as an employee, or the Corporate Portal as an organisation member.
8+
the frontend as a customer, the Back Office as an employee, or the Corporate Portal as an organization member.
99
You can send invitations to individual users or in bulk.
1010

1111
## Roles and Policies
1212

1313
To invite other members to the site or the Back Office, a user needs to have the `User:Invite` permission added to their Role.
14-
You can limit the ability to invite other members to specific User Groups,
15-
such as Editors, or to the specific Roles within the group, for example: Admin, Buyer.
14+
You can limit the ability to invite other members to specific user groups, such as Editors, or to the specific Roles within the group, for example: Admin, Buyer.
1615

1716
## Creating and sending invitations
1817

1918
Invitations are created with [InvitationService](../api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Invitation-InvitationService.html),
2019
but sending them requires additional setup.
2120
[[= product_name =]] provides you with `Ibexa\User\Invitation\MailSender` implementation of
2221
`InvitationSender` interface for sending invitations via email.
23-
If you want to send invitations through different channels, you will need to create a custom setup.
22+
If you want to send invitations through different channels, you need to create a custom setup.
2423

2524
## Invitation and registration form templates
2625

@@ -29,7 +28,7 @@ If you want to send invitations through different channels, you will need to cre
2928
To set up custom templates for invitation or registration forms,
3029
create a template file and inform the system, through configuration, when to use this template.
3130

32-
You might also set a SiteAccess under `scope`, to which the new user will be invited.
31+
You might also set a SiteAccess under `scope`, to which the new user is invited.
3332
If the SiteAccess is not set, it falls back to the default `site` value.
3433

3534
For example, use the following [configuration](configuration.md#configuration-files):
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
description: Update basic user account data from the console.
3+
---
4+
5+
# Update basic user data from CLI
6+
7+
Multiple user management scenarios may result in having to update basic user account data, such as user status, the password, or email.
8+
Especially, when a security breach occurs, you may need to revoke user access by disabling the account, or change the user's password.
9+
10+
You can do it without accessing the Admin UI, by running a console command.
11+
You reference the user account with either user id or login.
12+
13+
## Disable or enable user account
14+
15+
To change the status of a user account, you must have the `user/activation` permission.
16+
17+
Disable the user account:
18+
19+
```bash
20+
php bin/console ibexa:user:update-user --disable <user_reference>
21+
```
22+
23+
Enable the user account:
24+
25+
```bash
26+
php bin/console ibexa:user:update-user --enable <user_reference>
27+
```
28+
29+
## Change password
30+
31+
To change the password, you must have the `user/password` permission.
32+
33+
Change the password associated with the user account:
34+
35+
```bash
36+
php bin/console ibexa:user:update-user --password <user_reference>
37+
```
38+
39+
After you run the command, enter the new password when prompted.
40+
The command runs in silent mode and inputs are not echoed.
41+
42+
For more information about changing and revoking passwords, see [Passwords](passwords.md#revoking-passwords).
43+
44+
## Change email address
45+
46+
Change the email address associated with the user account:
47+
48+
```bash
49+
php bin/console ibexa:user:update-user --email=<new_email_address> <user_reference>
50+
```

docs/users/users.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ All such user accounts have the same underlying mechanism and enable you to cont
1515
"users/user_management_guide",
1616
"users/invitations",
1717
"users/user_registration",
18-
], columns=3) =]]
18+
"users/update_basic_user_data"
19+
], columns=4) =]]
1920

2021
## Authenticate users
2122

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ nav:
423423
- User setup:
424424
- Invitations: users/invitations.md
425425
- Registration: users/user_registration.md
426+
- Update basic user data: users/update_basic_user_data.md
426427
- User authentication:
427428
- Login methods: users/login_methods.md
428429
- Passwords: users/passwords.md

0 commit comments

Comments
 (0)