How to save current User Points as field at moment of adding a node? The registered users on my website can create nodes from a content type called 'Stuff'. I'd now like to display the author's User Points he/she had when he/she created the node. That means: the value shouldn't be updated when the author's User Points change in the future.

How can I do that? Can I do a similar thing for comments?

Can this be done with a code/dynamic/preprocess field, provided by the Display Suite module?



@arpitr's tip for using the Computed Field module seems a pretty good idea, but as I replied to his answer, I don't know anything about PHP. I tried the following code, but it doesn't work.

global $user;
$entity_field[0]['value'] = "userpoints_get_current_points($user-&gt;uid)";
Simply add one more field to the Stuff content type and use Computed Field module for adding that field.Since field is on content type so its value will be added while adding the node with the value of user points user will have while creating it,afterwards it will be same or depends on php code computing value for this field.


  Computed Field is a very powerful field module that lets you add a
  custom "computed fields" to your content types. These computed fields
  are populated with values that you define via PHP code. You may draw
  on anything available to Drupal, including other fields, the current
  user, database tables, you name it. (Feeling the power yet? :) ) You
  can also choose whether to store your computed field values in the
  database with other content fields, or have them "calculated" on the
  fly during node views. (Although you should note that Views use
  requires database stored values.) This field is literally the Swiss
  Army knife of fields. So start cooking up your PHP based values!