Fix keine Email wurde gesendet
This commit is contained in:
@@ -40,8 +40,6 @@
|
|||||||
// in der Datei "Web.config" auf "InProc" festgelegt ist. Wenn der Sitzungsmodus auf "StateServer"
|
// in der Datei "Web.config" auf "InProc" festgelegt ist. Wenn der Sitzungsmodus auf "StateServer"
|
||||||
// oder "SQLServer" festgelegt ist, wird das Ereignis nicht ausgelöst.
|
// oder "SQLServer" festgelegt ist, wird das Ereignis nicht ausgelöst.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Session.Remove("TokenforEmail");
|
Session.Remove("TokenforEmail");
|
||||||
Session.Remove("SessID");
|
Session.Remove("SessID");
|
||||||
Session.Remove("CustomerID");
|
Session.Remove("CustomerID");
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Partial Class ForgotPW
|
|||||||
valreqtxtEmail.Validate()
|
valreqtxtEmail.Validate()
|
||||||
If valreqtxtEmail.IsValid = True Then
|
If valreqtxtEmail.IsValid = True Then
|
||||||
regexval_txt_Email.Validate()
|
regexval_txt_Email.Validate()
|
||||||
If regexval_txt_Email.IsValid = True Then
|
If regexval_txt_Email.IsValid = False Then
|
||||||
regexval_txt_Email.ForeColor = Drawing.Color.OrangeRed
|
regexval_txt_Email.ForeColor = Drawing.Color.OrangeRed
|
||||||
regexval_txt_Email.ErrorMessage = "Annotation: The Domain does not match."
|
regexval_txt_Email.ErrorMessage = "Annotation: The Domain does not match."
|
||||||
regexval_txt_Email_2.Validate()
|
regexval_txt_Email_2.Validate()
|
||||||
@@ -122,10 +122,10 @@ Partial Class ForgotPW
|
|||||||
username = dr("Username").ToString()
|
username = dr("Username").ToString()
|
||||||
password = dr("Password").ToString()
|
password = dr("Password").ToString()
|
||||||
email = dr("Email").ToString()
|
email = dr("Email").ToString()
|
||||||
customerID = dr("UserId").ToString()
|
customerID = dr("KundenNr").ToString()
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If txt_Username.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True And String.IsNullOrEmpty(customerID) = True Then
|
If txt_Username.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True And String.IsNullOrEmpty(customerID) = False Then
|
||||||
username = txt_Username.Text
|
username = txt_Username.Text
|
||||||
isusrnmright = True
|
isusrnmright = True
|
||||||
ElseIf String.IsNullOrEmpty(txt_Username.Text) = True Then
|
ElseIf String.IsNullOrEmpty(txt_Username.Text) = True Then
|
||||||
@@ -138,12 +138,12 @@ Partial Class ForgotPW
|
|||||||
isusrnmright = False
|
isusrnmright = False
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
If (txtEmail.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail_M.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
|
If (txtEmail.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail_M.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
|
||||||
email = txtEmail.Text
|
email = txtEmail.Text
|
||||||
lblMessage.ForeColor = Color.Green
|
lblMessage.ForeColor = Color.Green
|
||||||
isemailright = True
|
isemailright = True
|
||||||
lblMessage.Text = "The given e-mail exists in our database."
|
lblMessage.Text = "The given e-mail exists in our database."
|
||||||
ElseIf String.IsNullOrEmpty(customerID) = True Then
|
ElseIf String.IsNullOrEmpty(email) = True Then
|
||||||
lblMessage_M.ForeColor = Color.Red
|
lblMessage_M.ForeColor = Color.Red
|
||||||
isemailright = False
|
isemailright = False
|
||||||
lblMessage_M.Text = "The given User does not exist in our database."
|
lblMessage_M.Text = "The given User does not exist in our database."
|
||||||
@@ -152,7 +152,20 @@ Partial Class ForgotPW
|
|||||||
isemailright = False
|
isemailright = False
|
||||||
lblMessage_M.Text = "The given e-mail does not exist in our database."
|
lblMessage_M.Text = "The given e-mail does not exist in our database."
|
||||||
End If
|
End If
|
||||||
|
If (txt_CustomerID.Text = dr("KundenNr").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID_M.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
|
||||||
|
email = txtEmail.Text
|
||||||
|
lblMessage.ForeColor = Color.Green
|
||||||
|
isCustomeridright = True
|
||||||
|
lblMessage.Text = "The given Customer-ID exists in our database."
|
||||||
|
ElseIf String.IsNullOrEmpty(customerID) = True Then
|
||||||
|
lblMessage_M.ForeColor = Color.Red
|
||||||
|
isCustomeridright = False
|
||||||
|
lblMessage_M.Text = "The given Customer-ID does not exist in our database."
|
||||||
|
Else
|
||||||
|
lblMessage_M.ForeColor = Color.Red
|
||||||
|
isCustomeridright = False
|
||||||
|
lblMessage_M.Text = "The given Customer-ID does not exist in our database."
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Dim Msg, Style, Title As String
|
Dim Msg, Style, Title As String
|
||||||
Msg = "E-Mail validation failed!" & vbCrLf + "Please try again!"
|
Msg = "E-Mail validation failed!" & vbCrLf + "Please try again!"
|
||||||
@@ -334,7 +347,7 @@ Partial Class ForgotPW
|
|||||||
email = dr("Email").ToString()
|
email = dr("Email").ToString()
|
||||||
customerID = dr("UserId").ToString()
|
customerID = dr("UserId").ToString()
|
||||||
Try
|
Try
|
||||||
If (txt_CustomerID_M.Text = dr("userId").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
|
If (txt_CustomerID_M.Text = dr("userId").ToString() AndAlso String.IsNullOrEmpty(txt_CustomerID.Text) = True) And String.IsNullOrEmpty(customerID) = True Then
|
||||||
customerID = txt_CustomerID_M.Text
|
customerID = txt_CustomerID_M.Text
|
||||||
lblMessage_M.ForeColor = Color.Green
|
lblMessage_M.ForeColor = Color.Green
|
||||||
isuserIDright = True
|
isuserIDright = True
|
||||||
@@ -352,7 +365,7 @@ Partial Class ForgotPW
|
|||||||
Title = "Authentication error!"
|
Title = "Authentication error!"
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
If (txtEmail_M.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
|
If (txtEmail_M.Text = dr("Email").ToString() AndAlso String.IsNullOrEmpty(txtEmail.Text) = True) And String.IsNullOrEmpty(customerID) = False Then
|
||||||
email = txtEmail_M.Text
|
email = txtEmail_M.Text
|
||||||
isuserEmailright = True
|
isuserEmailright = True
|
||||||
lblMessage_M.ForeColor = Color.Green
|
lblMessage_M.ForeColor = Color.Green
|
||||||
@@ -370,7 +383,7 @@ Partial Class ForgotPW
|
|||||||
Title = "Authentication error!"
|
Title = "Authentication error!"
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
If (txt_Username_M.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True) And String.IsNullOrEmpty(VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(customerID)) = True Then
|
If (txt_Username_M.Text = dr("Username").ToString() AndAlso String.IsNullOrEmpty(txt_Username_M.Text) = True) And String.IsNullOrEmpty(customerID) = True Then
|
||||||
username = txt_Username_M.Text
|
username = txt_Username_M.Text
|
||||||
lblMessage_M.ForeColor = Color.Green
|
lblMessage_M.ForeColor = Color.Green
|
||||||
isusernameright = True
|
isusernameright = True
|
||||||
|
|||||||
Reference in New Issue
Block a user