template toolkit and the user's ip address
David Miller
justdave at bugzilla.org
Fri May 6 18:48:50 UTC 2005
Jason Pyeron wrote:
> How can I display the IP address of the user in TT?
>
> In particular for :
>
> template/en/default/account/auth/login.html.tmpl
[% USE Bugzilla %] (if it isn't already doing that)
[% cgi = Bugzilla.cgi %]
[% ipaddr = cgi.remote_host() %]
Note that if you have "HostnameLookups On" in your httpd.conf that this
will give you a hostname instead of an IP address (if the address has a
reverse-DNS), but that's usually off in most Apache configs these days.
--
Dave Miller http://www.justdave.net/
System Administrator, Mozilla Foundation http://www.mozilla.org/
Project Leader, Bugzilla Bug Tracking System http://www.bugzilla.org/
More information about the developers
mailing list