Add alternative email addresses to the model

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.
This commit is contained in:
Peter Smit 2014-12-17 10:26:19 +02:00
parent d01f2f3c22
commit 99599c099f
2 changed files with 42 additions and 9 deletions

View file

@ -45,7 +45,7 @@ func init() {
new(Issue), new(Comment), new(Attachment), new(IssueUser), new(Label), new(Milestone),
new(Mirror), new(Release), new(LoginSource), new(Webhook),
new(UpdateTask), new(HookTask), new(Team), new(OrgUser), new(TeamUser),
new(Notice))
new(Notice), new(EmailAddress))
}
func LoadModelsConfig() {