set_user_enabled
Enable or disable a user account as an admin: disabling blocks login, sessions, and app passwords while keeping files, and enabling restores access.
Instructions
Enable or disable a user account. Requires admin (or sub-admin) privileges.
A disabled user cannot log in and their sessions and app passwords stop working, but the account, its files and shares are kept. Enable it again to restore access. Nobody can enable or disable their own account. Disabling needs the destructive permission level, enabling the write level.
Args: user_id: The user to enable or disable. enabled: True to enable the account, false to disable it.
Returns: Confirmation message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | Yes | ||
| user_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |