. . . "When the user sends ajax requests to send or get chat messages, or get the connected users list, request and user are passed to your function." . .