summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorAndrew <write@imaginarycode.com>2017-02-11 07:57:33 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-11 20:57:33 +0800
commit3f676760599896f168e454d132b368658751974a (patch)
tree8f481aebd091515ed2e922dc40a2bd26f059ae8f /models
parent8a0be5e9f01caaf3667c420f08541ac7c26127b8 (diff)
downloadgitea-3f676760599896f168e454d132b368658751974a.tar.gz
gitea-3f676760599896f168e454d132b368658751974a.zip
Implement basic Open Graph support. (#901)
Diffstat (limited to 'models')
-rw-r--r--models/user.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go
index c7ceacaa6b..0e1710de7e 100644
--- a/models/user.go
+++ b/models/user.go
@@ -252,6 +252,11 @@ func (u *User) HomeLink() string {
return setting.AppSubURL + "/" + u.Name
}
+// HTMLURL returns the user or organization's full link.
+func (u *User) HTMLURL() string {
+ return setting.AppURL + u.Name
+}
+
// GenerateEmailActivateCode generates an activate code based on user information and given e-mail.
func (u *User) GenerateEmailActivateCode(email string) string {
code := base.CreateTimeLimitCode(