Skip to content
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 emails #755

Merged
merged 6 commits into from Dec 21, 2014
Merged

Multiple emails #755

merged 6 commits into from Dec 21, 2014

Conversation

psmit
Copy link
Contributor

@psmit psmit commented Dec 17, 2014

I was missing the option of adding multiple email addresses to a single user, so I tried to implement this. Please let me know how you like it! I am willing to fix it/change it as desired!

A new struct is created named EmailAddress that contains alternative
email addresses for users. Also the email related methods; IsEmailUsed
and GetUserByEmail are updated.

DeleteUser deletes the extra email addresses and DeleteInactivateUsers
also deletes inactive accounts. This could be factored out, but should
do it for now.
All basics are implemented. Missing are the right (localized) strings
and the page markup could have a look at by a frontend guy.
@psmit
Copy link
Contributor Author

psmit commented Dec 17, 2014

Related issues: #351 #499 #646

@unknwon
Copy link
Member

unknwon commented Dec 18, 2014

Incredible! Thanks, we'll review it ASAP.

// primary email address, but is not obligatory
type EmailAddress struct {
Id int64
OwnerId int64 `xorm:"INDEX NOT NULL"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to just use Uid?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean instead of OwnerId? I copied the style from a PublicKey struct to call it OwnerId, but Uid would do fine as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, OwnerId is fine. I'm just thinking Uid is shorter...

@unknwon
Copy link
Member

unknwon commented Dec 19, 2014

Hi, thanks your PR again! I've made some comments.

Not able to see UI yet, would check on that after this is merged.

@psmit
Copy link
Contributor Author

psmit commented Dec 20, 2014

I'll try to check the comments today and make some improvements

@psmit
Copy link
Contributor Author

psmit commented Dec 20, 2014

I fixed the issues you mentioned in 20b5c23

@unknwon
Copy link
Member

unknwon commented Dec 21, 2014

Thanks! Sorry for late, I just finished my final exam this week and prepare for going back to home.

unknwon added a commit that referenced this pull request Dec 21, 2014
@unknwon unknwon merged commit a18decf into gogs:dev Dec 21, 2014
@psmit psmit deleted the multiple_emails branch December 21, 2014 11:40
ethantkoenig pushed a commit to ethantkoenig/gogs that referenced this pull request Jan 27, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants