def get_user():
return dict(<EOL>ip_address=request.remote_addr,<EOL>user_agent=request.user_agent.string,<EOL>user_id=(<EOL>current_user.get_id() if current_user.is_authenticated else None<EOL>),<EOL>session_id=session.get('<STR_LIT>')<EOL>)<EOL>
User information.

    .. note::

       **Privacy note** A users IP address, user agent string, and user id
       (if logged in) is sent to a message queue, where it is stored for about
       5 minutes. The information is used to:

       - Detect robot visits from the user agent string.
       - Generate an anonymized visitor id (using a random salt per day).
       - Detect the users host contry based on the IP address.

       The information is then discarded.