mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 14:37:20 +00:00
Add HomeLink and AvatarLink to User model. Please use .SignedUser in template.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user