diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-25 20:11:25 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-25 20:11:25 -0400 |
commit | 688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f (patch) | |
tree | 8adb59c369d1fe1bd41ae7be38785dc613a29a91 /models/user.go | |
parent | 87854c95a90cf1bebe1bffb833389471fb35f234 (diff) | |
download | gitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.tar.gz gitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.zip |
Fixed #209
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/user.go b/models/user.go index 1a2f3a5eb3..dd70a35f0b 100644 --- a/models/user.go +++ b/models/user.go @@ -18,6 +18,7 @@ import ( "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/log" + "github.com/gogits/gogs/modules/setting" ) // User types. @@ -73,9 +74,9 @@ func (user *User) HomeLink() string { // AvatarLink returns the user gravatar link. func (user *User) AvatarLink() string { - if base.DisableGravatar { + if setting.DisableGravatar { return "/img/avatar_default.jpg" - } else if base.Service.EnableCacheAvatar { + } else if setting.Service.EnableCacheAvatar { return "/avatar/" + user.Avatar } return "//1.gravatar.com/avatar/" + user.Avatar @@ -197,7 +198,7 @@ func getVerifyUser(code string) (user *User) { // verify active code when active account func VerifyUserActiveCode(code string) (user *User) { - minutes := base.Service.ActiveCodeLives + minutes := setting.Service.ActiveCodeLives if user = getVerifyUser(code); user != nil { // time limit code @@ -340,7 +341,7 @@ func DeleteUser(user *User) error { // UserPath returns the path absolute path of user repositories. func UserPath(userName string) string { - return filepath.Join(base.RepoRootPath, strings.ToLower(userName)) + return filepath.Join(setting.RepoRootPath, strings.ToLower(userName)) } func GetUserByKeyId(keyId int64) (*User, error) { |