# lockUser {#lockUser}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`lockUser(userId)`

## Arguments {#arguments}

**userId** is a string indicating a user name.

## Details {#details}

Lock the specified user*.* It can only be executed by administrators when the configuration parameter *enhancedSecurityVerification* is set to true.

## Examples {#examples}

``` {#codeblock_zq1_tms_c2c}
lockUser("user1")
```

Related function: [unlockUser](../u/unlockUser.md)

