fix external address password reset

This commit is contained in:
Peter Hormanns 2020-03-06 19:46:48 +01:00
parent ef095b7d2e
commit 7bfbf0b8c0

View File

@ -128,7 +128,10 @@ public class ResetPasswordServlet extends AbstractLDAPServlet {
for (User usr : allUsers) {
if (usr.getEmailInternal() != null && usr.getEmailInternal().equalsIgnoreCase(loginOrEMail)) {
login = usr.getLogin();
email = usr.getEmailExternal();
if (email == null || email.isEmpty()) {
email = usr.getEmailInternal();
}
salutation = usr.getFirstname() + " " + usr.getLastname();
}
}
@ -136,7 +139,10 @@ public class ResetPasswordServlet extends AbstractLDAPServlet {
final User usr = usrDAO.read("uid=" + loginOrEMail + ",ou=users,");
if (usr != null) {
login = usr.getLogin();
email = usr.getEmailExternal();
if (email == null || email.isEmpty()) {
email = usr.getEmailInternal();
}
salutation = usr.getFirstname() + " " + usr.getLastname();
}
}