Jump to content

Member field to replace $row->author()


Meddysong

Recommended Posts

Posted

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?

Posted

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) 🙂

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...