new Random().nextBytes(bytes);
final String photoB64Value = new String(Base64.encode(bytes), SyncopeConstants.DEFAULT_ENCODING);
UAttr attribute = new UAttr();
attribute.setSchema(photoSchema);
attribute.addValue(photoB64Value, AttributableUtil.getInstance(AttributableType.USER));
attribute.setOwner(user);
user.addAttr(attribute);
userDAO.save(user);