[Zope] Sending an alarm message to all logged-in users
Jens Vagelpohl
jens at dataflake.org
Sun Oct 17 12:35:11 EDT 2004
On Oct 17, 2004, at 18:14, Tino Wildenhain wrote:
> Hi,
>
> Am So, den 17.10.2004 schrieb Dennis Allison um 17:52:
>> Occasionally I have wished for a mechanism that would allow me to
>> write
>> all logged-in users. Of course, this could be acomplished with an
>> explicit test, but making the test costs a lot of overhead. Is
>> there a
>> better way?
>
> HTTP is stateless. There is no such thing like "logged in".
> Calls are only send from client to server, never the
> other way round. Thus, you cannot "send" something to all
> users.
One way to fake this out (as Tino already says, the concept of "logged
in user" is kind of meaningless) would be to have a slot in your main
template that would display something if...
- the current visitor has sent valid login information for the request
(meaning the user for the duration of the request is not "Anonymous
User")
- you fill some variable, maybe a property at the site root, or change
a script that returns something, with your message.
Those things can be tested for easily.
jens
More information about the Zope
mailing list