fix external address password reset
This commit is contained in:
parent
ef095b7d2e
commit
7bfbf0b8c0
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user