Message of the day:
Release 4.5.0 is out. Changelog: https://docs.silverstripe.org/en/4/changelogs/4.5.0
SilverStripe 4 related information and questions.
Cool, thanks for the advice 🙂
Yep that sounds cleaner. Thanks. Probably will add a check to see if the Member is an Admin as well as in my particular case they dont belong to an account
^this is where you want to do the magic
LoginHandler has an extension point "afterLogin". There you can check if the member has the account object set
Probably don’t want to delete them… there was a case in the past where we had that functionality and the CMS user accidentally pressed unpublish on the Account. Bye bye users 😛
you could also do something like add them to the "deactivated" group and add logic to not allow members in that group to log in
I’m assuming that I’ll have to add the logic to the authenticator/login handler then with this way?
Yep, the kind of member can only belong to 1 account
Does that kind of member have a special group? If yes, you could check if the member belongs to a valid account object
if you don't ever expect them to log in again, just delete them