# User fields empty for addPosterIcons when creating new post

**URL:** https://meta.discourse.org/t/user-fields-empty-for-addpostericons-when-creating-new-post/247328
**Category:** Development
**Created:** [December 1, 2022, 12:25pm UTC](https://meta.discourse.org/t/user-fields-empty-for-addpostericons-when-creating-new-post/247328 "2022-12-01T12:25:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![daniyal](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@daniyal](https://meta.discourse.org/u/daniyal)
#### Post date: [December 1, 2022, 12:25pm UTC](https://meta.discourse.org/t/user-fields-empty-for-addpostericons-when-creating-new-post/247328/1 "2022-12-01T12:25:44Z")

</div>

I am currently adding user social accounts in custom fields. Using plugin api’s addPosterIcons function to render the social accounts in front of username but the user custom fields are empty for a newly created post. What am I doing wrong here?

initializer.js

```plaintext
function initializeDiscourseUserProfileEnhancer(api) {
  api.addPosterIcons((cfs, attrs) => {
    // cfs and attrs.userCustomFields objects are empty for new post
  }

export default {
  name: "discourse-user-profile-enhancer",

  initialize() {
    withPluginApi("0.8.31", initializeDiscourseUserProfileEnhancer);
  },
};

```
