문제

I want to get private messages (provided by the Privatemsg module) that are related to a particular user, programatically.

How can I do this?

도움이 되었습니까?

해결책

Private messages are entities so you can use entity_load() to load them by condition...or use the wrapper provided by the private message module itself:

$messages = privatemsg_message_load_multiple(array(), array('author' => $uid));

That will get all messages created by the user identified by $uid.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top