Implement basic Open Graph support. (#901)

This commit is contained in:
Andrew
2017-02-11 07:57:33 -05:00
committed by Lunny Xiao
parent 8a0be5e9f0
commit 3f67676059
2 changed files with 29 additions and 0 deletions

View File

@ -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(