# Lock user accounts

{% hint style="info" %}
User permission: [Administration > Users](/administration/users/add-update-user/user-permissions.md#administrator-permissions)
{% endhint %}

You might want to lock a user account if the user no longer works for you but you are not yet ready to delete their user account, as it contains some shared content.

When you lock a user account, the user is signed out from all their sessions. As soon as they move to another page or take any sort of action, they will be either returned to the sign in screen or get the following message. They will be unable to sign back into Phocas until their account is unlocked.

<div align="left"><figure><img src="/files/nAH3Zl0CjuVAz9LxMg3l" alt="" width="317"><figcaption></figcaption></figure></div>

## Lock an individual user account <a href="#lockuseraccounts-lockanindividualuseraccount" id="lockuseraccounts-lockanindividualuseraccount"></a>

Go to the [user's account page](/administration/users/add-update-user/user-account-page.md) > **User** tab > **Permissions** section, select the **Account locked** checkbox and click **Save**.

<div align="left"><figure><img src="/files/qCip027hGWIspNHzddEb" alt="" width="308"><figcaption></figcaption></figure></div>

Alternatively, you can also use one of the bulk update methods below.

## Lock multiple user accounts in bulk <a href="#lockuseraccounts-lockmultipleuseraccountsinbulk" id="lockuseraccounts-lockmultipleuseraccountsinbulk"></a>

You can lock an account for one or more users using either of these methods:

* Go to the **User** page, select the users for whom you want to lock accounts and click **More > Bulk Update**. In the General Permissions screen, select **Account Locked** > **Yes** and proceed with the bulk update.

  <div align="left"><figure><img src="/files/sXtSChE8sYR6sHnmIgDl" alt="" width="679"><figcaption></figcaption></figure></div>
* Go to the [**Users** page](/administration/users.md), select the users for whom you want to lock accounts and click **More > Lock Account**.

  <div align="left"><figure><img src="/files/6Y7cp5cLfXgBih1F8TFs" alt="" width="274"><figcaption></figcaption></figure></div>

## Unlock a user account <a href="#lockuseraccounts-unlockauseraccount" id="lockuseraccounts-unlockauseraccount"></a>

You can unlock user accounts in a similar way to how you lock them.

* On the user account page > **User** tab > **Permissions** section, clear the **Account locked** checkbox and click **Save**.
* In the **Bulk Update** window > **General Permissions** screen, select **Account Locked** > **No** and proceed with the bulk update.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.phocassoftware.com/administration/users/lock-user-accounts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
