Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
clj13001 committed Apr 23, 2017
2 parents d9c38d7 + 1a3e3d4 commit 4e02bc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Binary file added Senior Design.war
Binary file not shown.
4 changes: 2 additions & 2 deletions WebContent/passwordreset.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ 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"),
set.getString("Phone_Number"),
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);
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/Mail.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<!DOCTYPE html>"
+ "<html>"
+ "<body>"
+ "<p>Your pasword has been reset. To login in, please use the password <b>"+password+"</b></p><br>"
+ "<p>Your pasword has been reset. To login in, please use the password <b>"+newpassword+"</b></p><br>"
+ "<p>You will be prompted to set a new password. If you didn't initiate this, sorry. Someone's probably messing with you.</p>"
+ "</body>"
+ "<footer style='text-align: center;'><font size='1'>To change notification settings, please visit your <a href='"+profileLink+"'>profile settings page</a></font></footer>"
Expand Down

0 comments on commit 4e02bc4

Please sign in to comment.