I added a field to the user profile containing a unique id. I want to print the unique id of the CURRENT user on a content view. Any idea how this can be done?

Just to add that the content being viewed is NOT authored by the current user

Comments

InformTheHeart created an issue. See original summary.

garchris’s picture

Issue summary: View changes
mustanggb’s picture

You could try using hook_node_view_alter(), or alternatively use a fields format, rather than content.

renatog’s picture

Status: Active » Reviewed & tested by the community

Hi people.

I checked and the solution #3 really works. hook_node_view_alter

RTBC

renatog’s picture

Status: Reviewed & tested by the community » Fixed

Thank you very much for your help @MustangGB.

Best,

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.