# I cannot create a new user with the ID of a deleted user

**URL:** <https://community.sendbird.com/t/i-cannot-create-a-new-user-with-the-id-of-a-deleted-user/4135>\
**Category:** Miscellaneous\
**Created:** [March 10, 2022, 7:37am UTC](https://community.sendbird.com/t/i-cannot-create-a-new-user-with-the-id-of-a-deleted-user/4135 "2022-03-10T07:37:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![2\_2](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/2_2/32/2100_2.png) [@2\_2](https://community.sendbird.com/u/2_2)\
**Post date:** [March 10, 2022, 7:37am UTC](https://community.sendbird.com/t/i-cannot-create-a-new-user-with-the-id-of-a-deleted-user/4135/1 "2022-03-10T07:37:42Z")

</div>

When I try to create a new user with the deleted user’s ID, [“user\_id” violates unique constraint.] message is displayed and user registration is not possible. I would appreciate it if you could tell me how to create a new user with the ID of the deleted user.

---

<div class="post-metadata">

**Author:** ![Chinmaya\_Gupta](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/chinmaya_gupta/32/1021_2.png) [@Chinmaya\_Gupta](https://community.sendbird.com/u/Chinmaya_Gupta)\
**Post date:** [March 10, 2022, 8:21am UTC](https://community.sendbird.com/t/i-cannot-create-a-new-user-with-the-id-of-a-deleted-user/4135/2 "2022-03-10T08:21:50Z")

</div>

Hello, @2_2 Welcome to the Sendbird community!

It may happen since this user is a member of a group channel.

You should be okay to recreate if remove this user from the group channel.

You can always deactivate a user (optionally remove it form all channels automatically)  
A deactivated user is like a removed user.

![](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/b/b4e47deb8a74aaec26d0d84642031fe145c9377f.png)[Sendbird Docs](https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-a-user-3-http-request)

### [User | Chat Platform API | Sendbird Docs](https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-a-user-3-http-request)

Manage the attributes and functionalities of the users.

Set attribute **is\_active** to false.

 ![Screenshot 2022-03-07 at 10.21.35](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/a/aa8013402e591b0072bc49d0c4a78062da789d50.png)

And **leave\_all\_when\_deactivated** to true (optional)

 ![Screenshot 2022-03-07 at 10.26.56](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/9/98a363ba6679a013c48e258cf5191bacd6ef62fa.png)

Some Additional info: our servers need some time (don’t know much exactly) to delete the user from our database so you can’t do requests to create the user again after a few milliseconds you have deleted the user.
