diff --git a/Senior Design.war b/Senior Design.war new file mode 100644 index 0000000..75fff92 Binary files /dev/null and b/Senior Design.war differ diff --git a/WebContent/passwordreset.jsp b/WebContent/passwordreset.jsp index f8f0f78..7d43820 100644 --- a/WebContent/passwordreset.jsp +++ b/WebContent/passwordreset.jsp @@ -103,8 +103,6 @@ if(request.getParameter("reset") != null){ */ ResultSet set = stmt.executeQuery("SELECT * from employee WHERE Email = \'" + email + "\' AND Employee_ID = " + ssoNum); if(set.next()){ - success = 1; - stmt.executeUpdate("UPDATE admin SET Password = \"" + hashpass + "\", Password_Flag = 0 WHERE Admin_ID = " + ssoNum); User changepass = new User(ssoNum, set.getInt("Location_ID"), set.getString("Name"), @@ -112,6 +110,8 @@ if(request.getParameter("reset") != null){ set.getString("Email"), set.getInt("Img_Index"), set.getInt("Notification_Preference")); + success = 1; + stmt.executeUpdate("UPDATE admin SET Password = \"" + hashpass + "\", Password_Flag = 0 WHERE Admin_ID = " + ssoNum); stmt.close(); connection.close(); new Mail(changepass).sendTemporaryPassword(newpass); diff --git a/src/utilities/Mail.java b/src/utilities/Mail.java index 3e9499a..de32c30 100644 --- a/src/utilities/Mail.java +++ b/src/utilities/Mail.java @@ -177,12 +177,12 @@ protected PasswordAuthentication getPasswordAuthentication(){ } } - public void sendTemporaryPassword(String password) { + public void sendTemporaryPassword(String newpassword) { String subject = "Your temporary {Application name} password"; String messege = "" + "" + "" - + "

Your pasword has been reset. To login in, please use the password "+password+"


" + + "

Your pasword has been reset. To login in, please use the password "+newpassword+"


" + "

You will be prompted to set a new password. If you didn't initiate this, sorry. Someone's probably messing with you.

" + "" + ""