PW vergessen wird korrekt ausgeführt.
This commit is contained in:
@@ -7,7 +7,15 @@ Imports System.Data
|
||||
|
||||
Partial Class login_ForgotPW
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs)
|
||||
If txt_Username.Text = "" Then
|
||||
Try
|
||||
txt_Username.Text = Request.QueryString.Item("Par1")
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub btn_Back_Click(sender As Object, e As EventArgs)
|
||||
Response.Redirect("login/login_FLEX.aspx")
|
||||
End Sub
|
||||
@@ -30,7 +38,7 @@ Partial Class login_ForgotPW
|
||||
' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
|
||||
Using con As New SqlConnection(ConnectionString)
|
||||
' Using cmd As New SqlCommand("Validate_User")
|
||||
Using cmd As New SqlCommand("SELECT COUNT(*) FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username")
|
||||
Using cmd As New SqlCommand("SELECT Username,Password FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username")
|
||||
' cmd.CommandType = CommandType.StoredProcedure
|
||||
cmd.Parameters.AddWithValue("@Username", username)
|
||||
cmd.Connection = con
|
||||
@@ -38,16 +46,17 @@ Partial Class login_ForgotPW
|
||||
'userId = Convert.ToInt32(cmd.ExecuteScalar())
|
||||
Dim dr As SqlDataReader = cmd.ExecuteReader()
|
||||
If dr.Read() Then
|
||||
username = dr("@Username").ToString()
|
||||
username = dr("Username").ToString()
|
||||
password = dr("Password").ToString()
|
||||
End If
|
||||
End Using
|
||||
con.Close()
|
||||
End Using
|
||||
|
||||
If Not String.IsNullOrEmpty(username) Then
|
||||
password = RandomString(New Random, 10)
|
||||
'password = RandomString(New Random, 10)
|
||||
'SendEmail(username, password, email)
|
||||
MsgBox("Mail would be sent successfully!" + Environment.NewLine + "new PW: \t" + password)
|
||||
MsgBox("Mail would be sent successfully!")
|
||||
lblMessage.ForeColor = Color.Green
|
||||
lblMessage.Text = "Passwort wurde erfolgreich an die angegebene E-Mail Adresse gesendet."
|
||||
Else
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2">
|
||||
<asp:LinkButton ID="LinkButton2" runat="server" target="_top" href="ForgotPW.aspx">Passwort Vergessen</asp:LinkButton>
|
||||
<a ID="LinkButton2" runat="server" target="_top" href="ForgotPW.aspx">Passwort Vergessen</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -153,20 +153,6 @@
|
||||
</asp:Login>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function bust3() {
|
||||
if (top.location == self) {
|
||||
var zipphone2_1 = getElementById("#CustomerID").val();
|
||||
var zipphone2_2 = getElementById("#UserName").val();
|
||||
var zipphone2_3 = getElementById("#Password").val();
|
||||
alert("send:" + zipphone2_1)
|
||||
alert("send:" + zipphone2_2)
|
||||
alert("send:" + zipphone2_3)
|
||||
//parent.location.replace('../Customers/Welcome.aspx');
|
||||
top.location = 'ForgotPW.aspx';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function bust2() {
|
||||
if (top.location == self) {
|
||||
|
||||
Reference in New Issue
Block a user