Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot into Development
This commit is contained in:
commit
638d5ca98c
|
@ -91,6 +91,12 @@ public class MergeEmailConfirmationManager {
|
|||
});
|
||||
oldUser.setUserStatus((short)1);
|
||||
oldUser.setEmail(null);
|
||||
List<Credential> credentials = databaseRepository.getCredentialDao().asQueryable().where((builder, root) -> builder.equal(root.get("userInfo"), oldUser)).toList();
|
||||
credentials.forEach(cred -> {
|
||||
if (cred.getId() != credential.getId()) {
|
||||
databaseRepository.getCredentialDao().delete(cred);
|
||||
}
|
||||
});
|
||||
databaseRepository.getUserInfoDao().createOrUpdate(oldUser);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue