Get users messages with PHP function


Home Forums Front End PM PRO Get users messages with PHP function

This topic is: Resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42240
    siteadmin
    Participant

    Hi, Im trying to write a function that will give an array of all messages that are sent to the user.
    I tried this function but I only receive messages that the user created and not the messages that are sent to the user. Can you please help. Thanks

    function get_users_messages()
    {
        
        $args = array('mgs_author_in' => array(get_current_user_id()));
    
    $message = fep_get_messages($args);
      
        return $message;
    }
    
    #42248
    Shamim Hasan
    Keymaster

    use following code

    $args['participant_query'][] = array(
    	'mgs_participant' => get_current_user_id(),
    	'mgs_deleted' => false,
    );
    
    #42249
    siteadmin
    Participant

    Wow this worked great. Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.