As far as I know, there's no way in the automation rules to say "send email to affected user as long as the user account is active". The disabled user accounts persist in the interest of data retention. Otherwise, if you had a 5-year helpdesk technician quit the company, and that person's user account was deleted in ServiceDesk, all the reference links to that user would be broken and the historical tickets and reports would no longer work as expected.
However, you may be able to skirt this issue by sending to a workflow in the automation rules instead of sending an email.
In the workflow to which you're sending the process, you would:
- Get the ticket info using the SessionID that's passed in
- Get the user info to which an email is being sent, and do a quick check on the AccountActive field
- If the account is active, send an email (it should be easy enough to recreate the template; you have a lot more control over the email and variable format this way as well)
- If the account is deactivated, skip the email and end the process
Here's a video about the process in case you're unfamiliar with it.
https://www-secure.symantec.com/connect/videos/servicedesk-customization-send-incident-workflow-ruleset-action
Another way to do this is to set up a scheduled monitor workflow that runs daily. The project would sort through the user accounts and add any deactivated users to a specific group meant to hold only deactivated users. Then, you could continue to use your automation rules are you already are, with this condition in place:
Both ideas do essentially the same thing; we're just checking to see if the user is active before attempting to send an email. Neither option is an easy fix like a nice checkbox toggle would be, but perhaps someone else can add a much easier idea or solution that I haven't considered.