@ Nonnull public EChange deleteUser ( @ Nullable final String sUserID ) { final User aUser = getOfID ( sUserID ) ; if ( aUser == null ) { AuditHelper . onAuditDeleteFailure ( User . OT , "no-such-user-id" , sUserID ) ; return EChange . UNCHANGED ; } m_aRWLock . writeLock ( ) . lock ( ) ; try { if ( BusinessObjectHelper . setDeletionNow ( aUser ) . isUnchanged ( ) ) { AuditHelper . onAuditDeleteFailure ( User . OT , "already-deleted" , sUserID ) ; return EChange . UNCHANGED ; } internalMarkItemDeleted ( aUser ) ; } finally { m_aRWLock . writeLock ( ) . unlock ( ) ; } AuditHelper . onAuditDeleteSuccess ( User . OT , sUserID ) ; // Execute callback as the very last action m_aCallbacks . forEach ( aCB -> aCB . onUserDeleted ( aUser ) ) ; return EChange . CHANGED ; }
Delete the user with the specified ID .