mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[GH-7260] Add check for verified email when required by server settings (#7275)
* Add check for verified email when required by server settings * remove debug and simplify logic with continue
This commit is contained in:
committed by
Harrison Healey
parent
cb266eb942
commit
06a959e19e
@@ -158,6 +158,12 @@ func SendNotifications(post *model.Post, team *model.Team, channel *model.Channe
|
||||
}
|
||||
}
|
||||
|
||||
//If email verification is required and user email is not verified don't send email.
|
||||
if utils.Cfg.EmailSettings.RequireEmailVerification && !profileMap[id].EmailVerified {
|
||||
l4g.Error("Skipped sending notification email to %v, address not verified. [details: user_id=%v]", profileMap[id].Email, id)
|
||||
continue
|
||||
}
|
||||
|
||||
var status *model.Status
|
||||
var err *model.AppError
|
||||
if status, err = GetStatus(id); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user