From: Roland Häder Date: Thu, 21 Apr 2016 12:41:40 +0000 (+0200) Subject: If the administrator updates only user data, contact is null X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb5e5d7036ad35804ea558aa3b9f38ac04cc1945;p=juser-core.git If the administrator updates only user data, contact is null --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 3f6d154..b5d76fe 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -172,8 +172,11 @@ public class LoginUser implements User { @Override public void copyAll (final User user) { - // Copy also contact data - this.getUserContact().copyAll(user.getUserContact()); + // Is contact set? + if (user.getUserContact() instanceof Contact) { + // Copy also contact data + this.getUserContact().copyAll(user.getUserContact()); + } // Copy other data this.setUserConfirmKey(user.getUserConfirmKey());