Usually, to avoid these issues the users are never deleted. They are locked, stripped of all roles and moved to special user group to indicate that the user is terminated. Generally, it's not a good idea to delete data in your information system.
Cheers