diff options
author | Zachery Hostens <zacheryph@gmail.com> | 2016-03-14 09:40:16 -0500 |
---|---|---|
committer | Zachery Hostens <zacheryph@gmail.com> | 2016-03-14 09:40:16 -0500 |
commit | 63e21c146aa3fda2715d55235d54dfb95a9077cc (patch) | |
tree | 340eb71cf4cc49251f789c21be4c9e879d92de04 /routers/user | |
parent | cb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff) | |
download | gitea-63e21c146aa3fda2715d55235d54dfb95a9077cc.tar.gz gitea-63e21c146aa3fda2715d55235d54dfb95a9077cc.zip |
ensure we don’t try changing LDAP passswords
Diffstat (limited to 'routers/user')
-rw-r--r-- | routers/user/auth.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index 3f37b09059..f42ad4f383 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -297,6 +297,12 @@ func ForgotPasswdPost(ctx *middleware.Context) { return } + if !u.IsLocal() { + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("auth.non_local_account"), FORGOT_PASSWORD, nil) + return + } + if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) { ctx.Data["ResendLimited"] = true ctx.HTML(200, FORGOT_PASSWORD) |