I created several goals with the Goals module. Every goal has an associated image.
My users have an image field 'Last goal' and I'd like to change it to the image associated with their latest completed goal. As this doesn't seem possible with the Rules module, I'd like to create a custom module. I found in the Goals API
that I can use hook_goals_completed_goal($goal_id, $uid)
, but I'm stuck there.
How can I grab the user's 'Last goal' field and change it to goal_img
?