Meddysong Posted January 15, 2019 Posted January 15, 2019 In a Pages database I'm using the member field to indicate which member the record refers to. (It's something like a staff directory.) I would like to use that field to display the member's profile picture. I know that $field_33 will give me the member_id. I also know that {template="userPhoto" app="core" group="global" params="$row->author()", 'tiny', $row->warningRef()"} will generate the profile picture complete with profile appearing on hover etc. Rather than $row->author() (which is always me), I want to use $field_33. However, it's not working. So I presume that the parameter generated by $row->author() has to be more than just the member_id. And just plugging in "1" seems to suggest it too because it doesn't work, even though that's my member_id. What does that parameter need to be if not the member_id? And how would I do that using field_33?
Aiwa Posted January 16, 2019 Posted January 16, 2019 Needs to be a member object. \IPS\Member::load($field_33)
Meddysong Posted January 16, 2019 Author Posted January 16, 2019 Thank you! I don't know how you knew that but I'm glad you did! One correction for anyone following this thread and wanting to do the same: it's \IPS\Member::load($row->field_33) 🙂
Recommended Posts
Archived
This topic is now archived and is closed to further replies.