How to hide the "Delete Account" button?


Is there any way we can hide the “Delete Account” button of logged in users?
Or is there any settings that forbid users from deleting their own accounts?


One simple solution would be hiding it via css. Enough for most users, not secure though (in case the user knows what he does he can still delete his account).

I just tried to delete the demo account on

It says “Demo account cannot be deleted”

Do you know how to do it? I want to prevent users delete their accounts.

@shoeper said that to you. Hide this button over CSS. Or you can edit source code, but you have to do it every server update … so CSS is easest way.

Add on the end of your custom.css file this:

#del-account {
    display: none;
1 Like

In case a user was deleted, is there a way to restore his account?

There are ways how to restore deleted rows on MySQL like DB systems, but it’s pretty hard cause, there are foreign keys pointing to records in another tables which can be deleted too. So if you don’t know Seafile database structure it’s practically imposible. Play with production database like this is bad practice and it can cause Seafile file system failure.

if you hide button then it’s user’s problem because he look for workaround and basic user cannot find how to do it.

This is what you are looking for.