1
0
Fork 0
forked from forgejo/forgejo

Add HomeLink and AvatarLink to User model. Please use .SignedUser in template.

This commit is contained in:
slene 2014-03-15 15:28:06 +08:00
parent e251b9bbca
commit 06deed820d
9 changed files with 147 additions and 24 deletions

View file

@ -56,6 +56,14 @@ type User struct {
Updated time.Time `xorm:"updated"`
}
func (user *User) HomeLink() string {
return "/user/" + user.LowerName
}
func (user *User) AvatarLink() string {
return "http://1.gravatar.com/avatar/" + user.Avatar
}
// A Follow represents
type Follow struct {
Id int64