Added disable user sign up feature

This commit is contained in:
Torkel Ödegaard
2015-01-29 15:46:54 +01:00
parent d95c5e6674
commit 04d03f73b3
9 changed files with 21 additions and 6 deletions

View File

@@ -56,6 +56,11 @@ func OAuthLogin(ctx *middleware.Context) {
// create account if missing
if err == m.ErrUserNotFound {
if setting.DisableUserSignUp {
ctx.Redirect(setting.AppSubUrl + "/login")
return
}
cmd := m.CreateUserCommand{
Login: userInfo.Email,
Email: userInfo.Email,