Hi,
welcome to EPESI community.
Do you mean do not allow login after working hours? For example allow to login only within nine to five?
Or do you mean ban ex-employee from login?
First, there is no such built-in function.
Second - you can deactivate user.
Regards,
Adam