Commit 54cda1fd authored by michael.simon's avatar michael.simon
Browse files

Change powerfolder derigster workflow, for better null value handling

parent 6407c592
......@@ -77,13 +77,16 @@ public class PowerFolderRegisterWorkflow implements RegisterUserWorkflow, Infota
DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy", Locale.ENGLISH);
PFAccount pfAccount = new PFAccount();
PFAccount pfAccount = pfWorker.getAccountInfoById(userId);
pfAccount.setId(userId);
pfAccount.setUsername(user.getEppn());
if (user.getEppn() != null)
pfAccount.setUsername(user.getEppn());
pfAccount.setNotes("Deactivated from Webreg");
pfAccount.setFirstname(user.getGivenName());
pfAccount.setSurname(user.getSurName());
if (user.getGivenName() != null)
pfAccount.setFirstname(user.getGivenName());
if (user.getSurName() != null)
pfAccount.setSurname(user.getSurName());
pfAccount.setSpaceAllowed("0");
pfAccount.setCustom3("webreg-inactive");
pfAccount.setValidTil(dateFormat.format(new Date(System.currentTimeMillis())));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment