Standard User account not getting removed on El capitan
Problem

It's possible that the user you're attempting to remove is the last FireVault capable account. You can see this illustrated by launching Directory Utility (/System/Library/CoreServices/Applications/Directory Utility.app) from the command line and attempting to remove the user:



From the command line, you should get something along these lines:

2017-11-06 16:08:03.777 Directory Utility[866:19875] Couldn't delete record "demouser" of type "dsRecTypeStandard:Users": Error Domain=com.apple.OpenDirectory Code=4001 "Attempting to delete the last FileVault capable user" UserInfo={NSLocalizedDescription=Attempting to delete the last FileVault capable user, NSLocalizedFailureReason=Operation was denied because the current credentials do not have the appropriate privileges.}

No matter how you launch Directory Utility or which permissions you use, you'll be unable to delete the user.

Solution

You'll need to enable FireVault if it isn't already and add the user you want to the list of users capable of unlocking the disk:



You can also use the command line: sudo fdesetup add -usertoadd username

After this is done, you'll be able to delete the user. You can also turn off FireVault if you feel like it.