No to chyba mamy błąd. Bo $memberId w hooku ma tylko to:
$status = $this->registry->getClass( 'memberStatus' )->fetchMemberLatest( $memberId ); // Fetch
Tak to wygląda ze strony memberstatus
/**
* Fetch the member's latest status update
*
* @param int Member ID
*/
public function fetchMemberLatest( $memberId )
{
$status = array();
$member = array();
$this->DB->build( array( 'select' => 's.*',
'from' => array( 'member_status_updates' => 's' ),
'where' => 's.status_member_id=' . intval( $memberId ) . ' AND s.status_author_id=' . intval( $memberId ),
'order' => 's.status_date DESC',
'limit' => array( 0, 1 ),
'add_join' => array(array( 'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.status_member_id',
'type' => 'left' ),
array( 'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
$row = $this->DB->fetch();
if ( is_array( $row ) AND count( $row ) )
{
foreach( $row as $k => $v )
{
if ( substr( $k, 0, 7 ) != 'status_' )
{
$member[ $k ] = $v;
}
$status[ $k ] = $v;
}
}
$this->_internalData['StatusData'] = $status;
$this->_internalData['StatusOwner'] = $member;
return is_array( $status ) ? $status : array();
}