diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-31 17:15:04 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-31 17:15:04 -0400 |
commit | 2657f88d9af9420329c49fab20bd1c7a5febc071 (patch) | |
tree | b6f403b9f403e4f639ddde6c337d57523e44a648 /routers/user | |
parent | ddb7f55035216193a18c713b3536fba10543b04d (diff) | |
download | gitea-2657f88d9af9420329c49fab20bd1c7a5febc071.tar.gz gitea-2657f88d9af9420329c49fab20bd1c7a5febc071.zip |
Fix #222
Diffstat (limited to 'routers/user')
-rw-r--r-- | routers/user/user.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/user/user.go b/routers/user/user.go index bdcd524152..a5b3e79253 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -26,6 +26,11 @@ func SignIn(ctx *middleware.Context) { return } + if setting.OauthService != nil { + ctx.Data["OauthEnabled"] = true + ctx.Data["OauthService"] = setting.OauthService + } + // Check auto-login. userName := ctx.GetCookie(setting.CookieUserName) if len(userName) == 0 { @@ -33,11 +38,6 @@ func SignIn(ctx *middleware.Context) { return } - if setting.OauthService != nil { - ctx.Data["OauthEnabled"] = true - ctx.Data["OauthService"] = setting.OauthService - } - isSucceed := false defer func() { if !isSucceed { |