summaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-11 23:52:08 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-11 23:52:08 -0400
commitd305448fa802a91ba81af1b78294f1658bcf834c (patch)
tree7bd274eb5c14c9d45c964e652b4c35d66de2cec9 /modules/base
parent3df8b2bef0f95f873e955840c6b12c3fe3dc9f8a (diff)
downloadgitea-d305448fa802a91ba81af1b78294f1658bcf834c.tar.gz
gitea-d305448fa802a91ba81af1b78294f1658bcf834c.zip
Mirror bug fix
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/conf.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 871595e476..d1564aa105 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -302,9 +302,9 @@ func NewConfigContext() {
InstallLock = Cfg.MustBool("security", "INSTALL_LOCK", false)
RunUser = Cfg.MustValue("", "RUN_USER")
- curUser := os.Getenv("USERNAME")
+ curUser := os.Getenv("USER")
if len(curUser) == 0 {
- curUser = os.Getenv("USER")
+ curUser = os.Getenv("USERNAME")
}
// Does not check run user when the install lock is off.
if InstallLock && RunUser != curUser {