Revision 49199
Added by Katerina Iatropoulou over 6 years ago
ForgotPasswordServlet.java | ||
---|---|---|
50 | 50 |
} |
51 | 51 |
|
52 | 52 |
try { |
53 |
String userEmail = ldapActions.getUsername(formEmail);
|
|
53 |
String username = ldapActions.getUsername(formEmail);
|
|
54 | 54 |
|
55 |
if (userEmail == null) {
|
|
55 |
if (username == null) {
|
|
56 | 56 |
request.getSession().setAttribute("message", "User does not exist."); |
57 | 57 |
response.sendRedirect("./forgotPassword.jsp"); |
58 | 58 |
|
59 | 59 |
} else { |
60 |
String username = ldapActions.getUsername(userEmail); |
|
61 | 60 |
UUID verificationCode = UUID.randomUUID(); |
62 | 61 |
Date creationDate = new Date(); |
63 | 62 |
|
... | ... | |
68 | 67 |
verificationActions.updateVerificationEntry(username, verificationCode.toString(), creationDate); |
69 | 68 |
} |
70 | 69 |
|
71 |
emailActions.sendVerificationCode(userEmail);
|
|
70 |
emailActions.sendVerificationCode(formEmail);
|
|
72 | 71 |
|
73 | 72 |
} |
74 | 73 |
|
Also available in: Unified diff
minor cahnges