diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/p4square/grow/ccb/CCBUser.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/p4square/grow/ccb/CCBUser.java b/src/main/java/com/p4square/grow/ccb/CCBUser.java index 7313172..fcd1593 100644 --- a/src/main/java/com/p4square/grow/ccb/CCBUser.java +++ b/src/main/java/com/p4square/grow/ccb/CCBUser.java @@ -22,7 +22,13 @@ public class CCBUser extends User { public CCBUser(final IndividualProfile profile) { mProfile = profile; - setIdentifier("CCB-" + mProfile.getId()); + // The identifier is set to the syncId if present, otherwise the CCB Id is used with the prefix CCB-. + final int syncId = mProfile.getSyncId(); + if (syncId > 0) { + setIdentifier(String.valueOf(syncId)); + } else { + setIdentifier("CCB-" + mProfile.getId()); + } setFirstName(mProfile.getFirstName()); setLastName(mProfile.getLastName()); setEmail(mProfile.getEmail()); |