summaryrefslogtreecommitdiffstats
path: root/routers/web/admin/emails.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/admin/emails.go')
-rw-r--r--routers/web/admin/emails.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/admin/emails.go b/routers/web/admin/emails.go
index b94f9d72c4..9482ae0123 100644
--- a/routers/web/admin/emails.go
+++ b/routers/web/admin/emails.go
@@ -87,7 +87,7 @@ func Emails(ctx *context.Context) {
emails[i].SearchEmailResult = *baseEmails[i]
// Don't let the admin deactivate its own primary email address
// We already know the user is admin
- emails[i].CanChange = ctx.User.ID != emails[i].UID || !emails[i].IsPrimary
+ emails[i].CanChange = ctx.Doer.ID != emails[i].UID || !emails[i].IsPrimary
}
}
ctx.Data["Keyword"] = opts.Keyword