I’m trying to use FlashMessenger to notify another user of an event. Does anyone know if this is possible?
Something like
$flashMessenger->addMessage( array('status'=> '', 'message'=> 'Hello!'), $user);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Quoting the manual page of the FlashMessenger :
So, the messages are stored in session — and a session is attached to / corresponds to a user ; the current user, actually.
The session is not meant to store data that is shared between different users — so I would say that this component cannot be used to notify other users of an event ; not natively, at least.
A possible solution would be :
A bit tricky, and not as easy as you’d hope, I admit…
Another idea, instead of using a database, would be to use some Caching engine (like APC, memcached, … see
Zend_Cache, to avoid hitting the DB.Have fun !