-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple email addresses per user #170
Comments
User has_many Emails? We can also use Email to store addresses used by the site perhaps? |
I was just thinking about this. What if we had a numeric primary key as the the real username then the 'primary' email address as an alias. This way you can change your primary email and use it as your login without actually changing the username in User directly. Not directly related to your issue @racke but I think this all needs a revisit. |
Our primary key on users is |
Which email addresses you thinking about SysPete? |
@racke maybe a shop has many different addresses that it sends from depending on context? I don't have specific use case just thinking out loud. |
ok then I am mistaken all together 😎 |
So let's start collecting use cases before we decide about schema changes. |
For use cases in initial issue comment from @racke we'd need to add table Email. If no objections then I will add. |
Columns I can see in Email:
|
There is another option for alternate email addresses: store them in Address class. We'd probably want to make country_iso_code nullable if we do this but is saves creating a new Email class. |
Also we need a generic reset token mechanism which is bound to an email address. Currently we only support password resets, but it would be useful for newsletter subscriptions as well. You might not want to enforce creation of a new user to a newsletter subscription. |
While it make sense to have a single email address to identify, I'm running in cases where it would be useful to somehow attach additional email addresses to an account.
Examples:
Merging similar accounts
ERP sync
BTS / Mailing lists.
Any idea how we can add this in a sane way to the schema?
The text was updated successfully, but these errors were encountered: