@ Nonnull public EChange disableUser ( @ Nullable final String sUserID ) { final User aUser = getOfID ( sUserID ) ; if ( aUser == null ) { AuditHelper . onAuditModifyFailure ( User . OT , sUserID , "no-such-user-id" , "disable" ) ; return EChange . UNCHANGED ; } m_aRWLock . writeLock ( ) . lock ( ) ; try { if ( aUser . setDisabled ( true ) . isUnchanged ( ) ) return EChange . UNCHANGED ; internalUpdateItem ( aUser ) ; } finally { m_aRWLock . writeLock ( ) . unlock ( ) ; } AuditHelper . onAuditModifySuccess ( User . OT , "disable" , sUserID ) ; // Execute callback as the very last action m_aCallbacks . forEach ( aCB -> aCB . onUserEnabled ( aUser , false ) ) ; return EChange . CHANGED ; }
disable the user with the specified ID .