How deactivate user account instead of deleteing the account

Hi there,
can you kindly say how can we programatically Deactivate a user until the next they log in. I see there is an option to disable a user but that does not seem to work as Deactivation. So here is the flow
User deactivates his/her account so they kind of become invisible until next time they log in again.
Kind regards,

Wouldn’t an ‘active’ flag associated with the user do that? It would indicate whether the user is active or inactive and when populating say, a list of users, the filter would only include active users.

I don’t know what your coding platform is but if you have a User object stored in Realm Swift

class User: Object {
   @objc dynamic var _id.....
   @objc dynamic var _partitionKey...
   @objc dynamic var favorite_food = ""
   @objc dynamic var active = true //a bool

Then to make the user inactive, set the active flag to false. When they next log in, set to true

Hi @Jay,
Thanks for the quick answer. Actually I also was thinking about a flag. But I was not sure and thought better to check for other likely solution which I might not be aware of. So we define the AKTIV flag in user customData.

BTW I use react js.

Kind regards,
Behzad :slight_smile: :pray: