What is the correct way to check a user's active status in user macro (isDeactivated alterantive)

I’m working on a custom replacement to the “User Lists” macro to show list of users that are part of a specific group. We need to make a custom version of this as the native “User Lists” macro does not list email addresses and is not formatted in the way we require.

I have a proof-of-concept working well, but I cannot figure out how to properly check each user’s active status. The native “User Lists” macro filters out inactive users by default, which is the same behavior we want to maintain. I’m currently using the isDeactivated() method from UserAccessor like this with some success:

####
## Flip user data from an iterable to a simple list for processing
## and sorting needs. Also filter out inactive users.
####
#set($userList = [])
#foreach ($user in $members)
  #if(!$userAccessor.isDeactivated($user))
    #set($result = $userList.add($user))
  #end
#end

However, it appears that isDeactivated() is deprecated, and so I worry this will stop working upon a future update:

https://docs.atlassian.com/ConfluenceServer/javadoc/7.15.0/bucket/user/UserAccessor.html#isDeactivated-java.lang.String-

What is the correct forward-compatible way to do this?