Skip to content
Snippets Groups Projects
Commit 0088e76e authored by uhensler's avatar uhensler
Browse files

Merge OpenOLAT 12.3.x to OpenOLAT default with 49551e2f892ba7c28fc30fae7e7f3a93d4bc7f6a

parents e483f6fe d45c5f51
No related branches found
No related tags found
No related merge requests found
......@@ -303,7 +303,7 @@ public class RegistrationController extends BasicController implements Activatea
};
boolean isMailSent = false;
if (UserManager.getInstance().isEmailAllowed(email)) {
if (registrationManager.isRegistrationPending(email) || UserManager.getInstance().isEmailAllowed(email)) {
TemporaryKey tk = null;
if (userModule.isEmailUnique()) {
tk = registrationManager.loadTemporaryKeyByEmail(email);
......
......@@ -370,18 +370,21 @@ public class RegistrationManager {
}
}
}
tk = loadTemporaryKeyByAction(RegistrationManager.REGISTRATION);
if (tk != null) {
for (TemporaryKey temporaryKey : tk) {
return isRegistrationPending(emailAddress);
}
public boolean isRegistrationPending(String emailAddress) {
List<TemporaryKey> temporaryKeys = loadTemporaryKeyByAction(RegistrationManager.REGISTRATION);
if (temporaryKeys != null) {
for (TemporaryKey temporaryKey : temporaryKeys) {
if (emailAddress.equalsIgnoreCase(temporaryKey.getEmailAddress())) {
return true;
}
}
}
return false;
}
/**
* Evaluates whether the given identity needs to accept a disclaimer before
* logging in or not.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment