Preventing bad email configuration from failing personal access token creation. (#11027)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
e20d91b00e
Коммит
d88de07b9d
@@ -256,8 +256,11 @@ func (a *App) CreateUserAccessToken(token *model.UserAccessToken) (*model.UserAc
|
||||
}
|
||||
token = result.Data.(*model.UserAccessToken)
|
||||
|
||||
if err := a.SendUserAccessTokenAddedEmail(user.Email, user.Locale, a.GetSiteURL()); err != nil {
|
||||
return nil, err
|
||||
// Don't send emails to bot users.
|
||||
if !user.IsBot {
|
||||
if err := a.SendUserAccessTokenAddedEmail(user.Email, user.Locale, a.GetSiteURL()); err != nil {
|
||||
a.Log.Error("Unable to send user access token added email", mlog.Err(err), mlog.String("user_id", user.Id))
|
||||
}
|
||||
}
|
||||
|
||||
return token, nil
|
||||
|
||||
Ссылка в новой задаче
Block a user