PLT-3454 Verification Email fails to send when logging in with username (#3475)

This commit is contained in:
enahum
2016-07-05 11:20:26 -04:00
committed by Harrison Healey
parent 068df708c0
commit 0f873c01da

View File

@@ -2263,12 +2263,10 @@ func resendVerification(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if result := <-Srv.Store.User().GetByEmail(email); result.Err != nil {
c.Err = result.Err
if user, error := getUserForLogin(email, false); error != nil {
c.Err = error
return
} else {
user := result.Data.(*model.User)
if user.LastActivityAt > 0 {
go SendEmailChangeVerifyEmail(c, user.Id, user.Email, c.GetSiteURL())
} else {