This works. The code looks fine and I confirmed that after deactivating some user emails are not sent to him.
This works. The code looks fine and I confirmed that after deactivating some user emails are not sent to him.