diff options
Diffstat (limited to 'routers/api/v1/user/email.go')
-rw-r--r-- | routers/api/v1/user/email.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go index ed79723c60..9060741c59 100644 --- a/routers/api/v1/user/email.go +++ b/routers/api/v1/user/email.go @@ -28,7 +28,7 @@ func ListEmails(ctx *context.APIContext) { // "200": // "$ref": "#/responses/EmailList" - emails, err := user_model.GetEmailAddresses(ctx.User.ID) + emails, err := user_model.GetEmailAddresses(ctx.Doer.ID) if err != nil { ctx.Error(http.StatusInternalServerError, "GetEmailAddresses", err) return @@ -71,7 +71,7 @@ func AddEmail(ctx *context.APIContext) { emails := make([]*user_model.EmailAddress, len(form.Emails)) for i := range form.Emails { emails[i] = &user_model.EmailAddress{ - UID: ctx.User.ID, + UID: ctx.Doer.ID, Email: form.Emails[i], IsActivated: !setting.Service.RegisterEmailConfirm, } @@ -124,7 +124,7 @@ func DeleteEmail(ctx *context.APIContext) { for i := range form.Emails { emails[i] = &user_model.EmailAddress{ Email: form.Emails[i], - UID: ctx.User.ID, + UID: ctx.Doer.ID, } } |