Yes… When the button is clicked, just delete the User.
But… there are a lot more things to consider…
Firstly, do you really want to delete the User from your database? Or just mark them as inactive? If you need to keep any kind of historical records, then you probably don’t want to actually delete them… (but maybe you do).
Delete User content? If the user has created content in your app - posts, tasks, comments, messages to other users, events, products, reviews, etc. - will you delete all of those as well when the user is deleted?
If not, then how will you hadn’t displaying who created those items (i.e. if a User sent a message to another User, and the you delete the Sender, what will you display when you show the recipient that message?)
And if so, then you’ll need to ensure that doesn’t have knock on effects elsewhere - i.e. if you delete a User, and all the Products a user has added get deleted as well, what will you show on transactions of other users who have purchase those products?
There is a lot to consider when think about how to handle deleting Users (something that sooo many people overlook).