File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,8 @@ func Profile(ctx *context.Context) {
235
235
}
236
236
}
237
237
238
- ctx .Data ["ShowUserEmail" ] = setting .UI .ShowUserEmail
238
+ ctx .Data ["ShowUserEmail" ] = (len (ctxUser .Email ) > 0 && ctx .IsSigned && ! ctxUser .KeepEmailPrivate ) ||
239
+ ctxUser .ID == ctx .User .ID // Show email if the authenticated user owns the profile being viewed
239
240
240
241
ctx .HTML (200 , tplProfile )
241
242
}
Original file line number Diff line number Diff line change 22
22
{{if .Owner.Location}}
23
23
<li><i class="octicon octicon-location"></i> {{.Owner.Location}}</li>
24
24
{{end}}
25
- {{if and $ .ShowUserEmail .Owner.Email .IsSigned (not .Owner.KeepEmailPrivate) }}
25
+ {{if .ShowUserEmail }}
26
26
<li>
27
27
<i class="octicon octicon-mail"></i>
28
28
<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
You can’t perform that action at this time.
0 commit comments