summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/oauth.go b/app/oauth.go
index cd45b0c10..be0535f35 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -535,11 +535,11 @@ func (a *App) CompleteSwitchWithOAuth(service string, userData io.ReadCloser, em
return nil, result.Err
}
- go func() {
+ a.Go(func() {
if err := SendSignInChangeEmail(user.Email, strings.Title(service)+" SSO", user.Locale, utils.GetSiteURL()); err != nil {
l4g.Error(err.Error())
}
- }()
+ })
return user, nil
}
@@ -770,11 +770,11 @@ func (a *App) SwitchOAuthToEmail(email, password, requesterId string) (string, *
T := utils.GetUserTranslations(user.Locale)
- go func() {
+ a.Go(func() {
if err := SendSignInChangeEmail(user.Email, T("api.templates.signin_change_email.body.method_email"), user.Locale, utils.GetSiteURL()); err != nil {
l4g.Error(err.Error())
}
- }()
+ })
if err := a.RevokeAllSessions(requesterId); err != nil {
return "", err