- avatarId = request.getHttpRequest().getPartAsStringFailsafe("avatar-id", 36);
- profile.setFirstName(firstName.length() > 0 ? firstName : null);
- profile.setMiddleName(middleName.length() > 0 ? middleName : null);
- profile.setLastName(lastName.length() > 0 ? lastName : null);
- profile.setBirthDay(birthDay).setBirthMonth(birthMonth).setBirthYear(birthYear);
- profile.setAvatar(webInterface.getCore().getImage(avatarId, false));
+ avatarId = request.getHttpRequest().getPartAsStringFailsafe("avatarId", 36);
+ profile.modify().setFirstName(getNameFromFormField(firstName)).setMiddleName(getNameFromFormField(middleName)).setLastName(getNameFromFormField(lastName)).update();
+ profile.modify().setBirthDay(birthDay).setBirthMonth(birthMonth).setBirthYear(birthYear).update();
+ profile.setAvatar(webInterface.getCore().getImage(avatarId).transform(GET_ID));