activating_deactivating_users.md 2.13 KB
Newer Older
1 2 3 4 5 6
---
type: howto
---

# Activating and deactivating users

7 8
GitLab administrators can deactivate and activate users.

9 10
## Deactivating a user

11
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/22257) in GitLab 12.4.
12

13 14
In order to temporarily prevent access by a GitLab user that has no recent activity, administrators
can choose to deactivate the user.
15

16 17
Deactivating a user is functionally identical to [blocking a user](blocking_unblocking_users.md),
with the following differences:
18 19 20 21 22 23 24 25

- It does not prohibit the user from logging back in via the UI.
- Once a deactivated user logs back into the GitLab UI, their account is set to active.

A deactivated user:

- Cannot access Git repositories or the API.
- Will not receive any notifications from GitLab.
26
- Will not be able to use [slash commands](../../integration/slash_commands.md).
27

28
Personal projects, and group and user history of the deactivated user will be left intact.
29

30
A user can be deactivated from the Admin Area. To do this:
31 32 33 34 35 36 37 38 39 40

1. Navigate to  **Admin Area > Overview > Users**.
1. Select a user.
1. Under the **Account** tab, click **Deactivate user**.

Please note that for the deactivation option to be visible to an admin, the user:

- Must be currently active.
- Should not have any activity in the last 180 days.

41
Users can also be deactivated using the [GitLab API](../../api/users.md#deactivate-user).
42 43

NOTE: **Note:**
44
A deactivated user does not consume a [seat](../../subscriptions/index.md#managing-subscriptions).
45 46 47

## Activating a user

48
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/22257) in GitLab 12.4.
49

50
A deactivated user can be activated from the Admin Area.
51 52 53 54 55 56 57 58

To do this:

1. Navigate to  **Admin Area > Overview > Users**.
1. Click on the **Deactivated** tab.
1. Select a user.
1. Under the **Account** tab, click **Activate user**.

59
Users can also be activated using the [GitLab API](../../api/users.md#activate-user).
60 61

NOTE: **Note:**
62 63
Activating a user will change the user's state to active and it consumes a
[seat](../../subscriptions/index.md#managing-subscriptions).
64 65 66

TIP: **Tip:**
A deactivated user can also activate their account by themselves by simply logging back via the UI.