summaryrefslogtreecommitdiffstats
path: root/services/auth/reverseproxy.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-08-12 08:26:33 +0100
committerGitHub <noreply@github.com>2021-08-12 10:26:33 +0300
commit162c32af7ec9cc434895079cfc7bfc683feb4d4c (patch)
tree5110a77931917910e4a92b92705a185891a0ff83 /services/auth/reverseproxy.go
parente29e1637370ad95e4ca9f861c25d366b74829dcc (diff)
downloadgitea-162c32af7ec9cc434895079cfc7bfc683feb4d4c.tar.gz
gitea-162c32af7ec9cc434895079cfc7bfc683feb4d4c.zip
Send registration email on user autoregistration (#16523)
When users login and are autoregistered send email notification. Fix #16178 * Protect public functions within the mailer by testing if the mailer is configured Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'services/auth/reverseproxy.go')
-rw-r--r--services/auth/reverseproxy.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/auth/reverseproxy.go b/services/auth/reverseproxy.go
index 46d8d3fa63..7ff226077c 100644
--- a/services/auth/reverseproxy.go
+++ b/services/auth/reverseproxy.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/web/middleware"
+ "code.gitea.io/gitea/services/mailer"
gouuid "github.com/google/uuid"
)
@@ -112,5 +113,7 @@ func (r *ReverseProxy) newUser(req *http.Request) *models.User {
return nil
}
+ mailer.SendRegisterNotifyMail(user)
+
return user
}