diff options
author | jim-p <jimp@pfsense.org> | 2015-08-25 14:41:42 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-08-25 14:41:42 -0400 |
commit | d2ecbddc79a9b67cae52fca6cd3b7bebd758b047 (patch) | |
tree | de3178137611050d9516f12255208847a1cfae85 /src/etc | |
parent | 5240564c054781330437c1767d61114d33bf7bb8 (diff) | |
download | pfsense-d2ecbddc79a9b67cae52fca6cd3b7bebd758b047.zip pfsense-d2ecbddc79a9b67cae52fca6cd3b7bebd758b047.tar.gz |
For captive portal, if a user reloads index.php of the portal while already logged in, show the logout page instead if it's custom.
Must be a custom logout page that does not include a redirect.
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/captiveportal.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index bd294e4..e95cc75 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -2406,4 +2406,15 @@ function captiveportal_send_server_accounting($off = false) { $racct->close(); return $retvalue; } + +function captiveportal_isip_logged($clientip) { + global $g, $cpzone; + + /* read in client database */ + $query = "WHERE ip = '{$clientip}'"; + $cpdb = captiveportal_read_db($query); + foreach ($cpdb as $cpentry) { + return $cpentry; + } +} ?> |