|
| 1 | +# How to Reactivate a User |
| 2 | + |
| 3 | +!!! seealso "Full Command Reference" |
| 4 | + |
| 5 | + For a complete reference of all options, see the [`compiler-admin user reactivate` reference section](../../reference/cli/user.md#compiler-admin-user-reactivate). |
| 6 | + |
| 7 | +This guide explains how to use the `compiler-admin user reactivate` command to restore a previously deactivated user account. |
| 8 | + |
| 9 | +## Actions Performed |
| 10 | + |
| 11 | +The `reactivate` command performs the following actions: |
| 12 | + |
| 13 | +- Checks that the user is currently in the "Alumni" OU (i.e., deactivated). |
| 14 | +- Adds the user back to the default "Team" group. |
| 15 | +- Moves the user to either the "Staff" or "Contractors" OU. |
| 16 | +- If moved to "Staff", adds them to the "Staff" group. |
| 17 | +- Resets their password and requires them to change it on next login. |
| 18 | +- Can update their recovery email and phone number. |
| 19 | +- Generates a new set of 2-Step Verification backup codes and prints them to the console. |
| 20 | + |
| 21 | +## Basic Usage |
| 22 | + |
| 23 | +To reactivate a user, provide their `username`. By default, they are reactivated as a contractor. |
| 24 | + |
| 25 | +```bash |
| 26 | +compiler-admin user reactivate some.user |
| 27 | +``` |
| 28 | + |
| 29 | +The command will ask for confirmation before proceeding. To bypass this, use the `--force` flag. |
| 30 | + |
| 31 | +## Reactivating as Staff |
| 32 | + |
| 33 | +To reactivate a user as a full staff member, use the `--staff` flag. |
| 34 | + |
| 35 | +```bash |
| 36 | +compiler-admin user reactivate some.user --staff |
| 37 | +``` |
| 38 | + |
| 39 | +## Setting Recovery and Notification Info |
| 40 | + |
| 41 | +You can set the user's recovery information and notify them or a manager of the reactivation. |
| 42 | + |
| 43 | +- `--recovery-email`: Sets the user's recovery email address. |
| 44 | +- `--recovery-phone`: Sets the user's recovery phone number. |
| 45 | +- `--notify`: Sends the new password credentials to the specified email address. |
| 46 | + |
| 47 | +```bash |
| 48 | +compiler-admin user reactivate some.user \ |
| 49 | + --staff \ |
| 50 | + --recovery-email some.user.personal@email.com \ |
| 51 | + --notify manager@compiler.la |
| 52 | +``` |
0 commit comments