Detect company based on email at registration / auto join? #100
-
I’m working on a project (rebuilding a legacy application) where different companies can sign up. In the past we’ve had problems where a user has left the company, a new member of staff has come aboard and didn’t know the company had an account. So they have created a new account leading to duplicate companies in the system. Is there an elegant solution to deal with this? I was thinking using the email domain and checking if there was a user and then company matching this. It’s not ideal as they may have several companies under a single domain and would need to be disabled for gmail addresses etc. I think automatically adding them would be too risky, instead they get offered the company to join. But then they should really be approved by an admin (who may have left the company so can’t). I hope that makes sense. Do you have any thoughts or ideas around tackling this? I’m not entirely sure where it would live in the code too as new to Filament. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Well so are you not deleting the company if the user has "left"? This way there wouldn't be duplicate companies? |
Beta Was this translation helpful? Give feedback.
Yeah, I suppose that would be a solid solution. I think this would be up to the company and it is their responsibility to ensure new employees are aware of this. I mean, what is common for popular services to do in this case? Maybe implement something similar.
Just ensure that your approach complies with data privacy regulations and doesn’t expose sensitive information. For instance, when displaying admin contact information, ensure it's done securely and with consent.