Trying to fix the support of clientID
This commit is contained in:
parent
e7a2c2edd4
commit
d39350aedf
|
@ -121,13 +121,19 @@ public class CKANUser extends CKAN {
|
|||
* @return true if the display name and the full name has been updated
|
||||
*/
|
||||
private boolean checkAndSetEmail(ObjectNode objectNode) {
|
||||
String portalEmail = SecretManagerProvider.instance.get().getUser().getEmail();
|
||||
User user = SecretManagerProvider.instance.get().getUser();
|
||||
String portalEmail = user.getEmail();
|
||||
|
||||
String ckanEmail = "";
|
||||
if(objectNode.has(EMAIL)) {
|
||||
ckanEmail = objectNode.get(EMAIL).asText();
|
||||
}
|
||||
if(portalEmail!= null && portalEmail.compareTo(ckanEmail) != 0) {
|
||||
if(portalEmail==null) {
|
||||
String username = user.getUsername();
|
||||
String eMail = username + "@d4science.org";
|
||||
objectNode.put(EMAIL, eMail);
|
||||
return true;
|
||||
} else if(portalEmail.compareTo(ckanEmail) != 0) {
|
||||
objectNode.put(EMAIL, portalEmail);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue