diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-21 15:11:56 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-21 15:11:56 -0700 |
commit | ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c (patch) | |
tree | 3c890327d884b33ad149196ddf9879313b2b000b /api/user.go | |
parent | ee5a77ec56ee13f5eb96fce6065b4b7a1845de89 (diff) | |
download | chat-ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c.tar.gz chat-ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c.tar.bz2 chat-ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c.zip |
Adding email to admin console
Diffstat (limited to 'api/user.go')
-rw-r--r-- | api/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go index 0a54b6a5d..352e1f0e1 100644 --- a/api/user.go +++ b/api/user.go @@ -58,7 +58,7 @@ func InitUser(r *mux.Router) { } func createUser(c *Context, w http.ResponseWriter, r *http.Request) { - if utils.Cfg.ServiceSettings.DisableEmailSignUp { + if !utils.Cfg.EmailSettings.AllowSignUpWithEmail { c.Err = model.NewAppError("signupTeam", "User sign-up with email is disabled.", "") c.Err.StatusCode = http.StatusNotImplemented return @@ -324,7 +324,7 @@ func checkUserPassword(c *Context, user *model.User, password string) bool { func Login(c *Context, w http.ResponseWriter, r *http.Request, user *model.User, deviceId string) { c.LogAuditWithUserId(user.Id, "attempt") - if !user.EmailVerified && !utils.Cfg.EmailSettings.ByPassEmail { + if !user.EmailVerified && utils.Cfg.EmailSettings.RequireEmailVerification { c.Err = model.NewAppError("Login", "Login failed because email address has not been verified", "user_id="+user.Id) c.Err.StatusCode = http.StatusForbidden return |