Org uses userAccountControl attribute which has numericals codes. Generally, if the value is 512, 514 the user acc is considered inactive, you can use that to maintain the active flag.

 

Best Regards
Aman Kumar