<HTML dir=ltr><HEAD><TITLE>Re: [isf-wifidog] After login go to web-page requested, rather than portal</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText80234 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>So something like this then...</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"><STRONG>wifidog-auth/wifidog/portal/index.php</STRONG></FONT></DIV>
<DIV dir=ltr><BR><FONT face="Courier New">if($node-&gt;PortalOriginalUrl() &amp;&amp; $network-&gt;getPortalOriginalUrlAllowed())&nbsp; <BR>&nbsp;&nbsp; {&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; header("Location: " . SESS_ORIGINAL_URL_VAR"); <BR>&nbsp;&nbsp; }</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"><STRONG>wifidog-auth/wifidog/classes/Network.php</STRONG></FONT></DIV>
<DIV dir=ltr><BR><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /** <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * Are nodes allowed to redirect users to the original requested web page instead of <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * the portal? <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @return bool True or false <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @access public <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */ <BR>&nbsp;&nbsp;&nbsp;&nbsp; public function getPortalOriginalUrlAllowedAllowed() <BR>&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (($this-&gt;_row['allow_original_URL_redirect'] == 't') ? true : false); <BR>&nbsp;&nbsp;&nbsp;&nbsp; } <BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; /** <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * Set if nodes are allowed to redirect users to the original requested web page <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * instead of the portal? <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @param bool $value The new value, true or false <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @return bool True on success, false on failure <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @access public <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */ <BR>&nbsp;&nbsp;&nbsp;&nbsp; public function setCustomPortalRedirectAllowed($value) <BR>&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Init values <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $retval = true; <BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($value != $this-&gt;getCustomPortalRedirectAllowed()) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $db = AbstractDb::getObject(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $value ? $value = 'TRUE' : $value = 'FALSE'; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $retval = $db-&gt;execSqlUpdate("UPDATE networks SET allow_original_URL_redirect = {$value} WHERE network_id = '{$this-&gt;getId()}'", false); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;refresh(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $retval; <BR>&nbsp;&nbsp;&nbsp;&nbsp; } </FONT></DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"><STRONG>wifidog-auth/wifidog/classes/Node.php</STRONG></FONT></DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face="Courier New">&nbsp;&nbsp; /** redirect users to the original requested web page instead of portal <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Must be enabled in the Network configuration to have any effect <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @return a string */ <BR>&nbsp;&nbsp;&nbsp;&nbsp; function PortalOriginalUrl() <BR>&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (($this-&gt;_row['allow_original_URL_redirect'] == 't') ? true : false); <BR>&nbsp;&nbsp;&nbsp;&nbsp; } <BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; /** redirect users to the original requested web page instead of portal <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Must be enabled in the Network configuration to have any effect <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @return true on success, false on failure */ <BR>&nbsp;&nbsp;&nbsp;&nbsp; function setCustomPortalRedirectUrl($value) <BR>&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $retval = true; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($value != $this-&gt;getCustomPortalRedirectUrl()) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $db = AbstractDb::getObject(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $value = $db-&gt;escapeString($value); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $retval = $db-&gt;execSqlUpdate("UPDATE nodes SET allow_original_URL_redirect = '{$value}' WHERE node_id = '{$this-&gt;getId()}'", false); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;refresh(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $retval; <BR>&nbsp;&nbsp;&nbsp;&nbsp; } <BR></FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Benoit Grégoire [mailto:benoitg@coeus.ca]<BR><B>Sent:</B> Fri 9/26/2008 11:40 PM<BR><B>To:</B> wifidog@listes.ilesansfil.org<BR><B>Cc:</B> Robin Jones; listserv.traffic@sloop.net<BR><B>Subject:</B> Re: [isf-wifidog] After login go to web-page requested, rather than portal<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>On 26 September 2008, Robin Jones wrote:<BR>&gt; You can do this in the nodes wifidog.config:<BR>&gt;<BR>&gt; #&nbsp;&nbsp; PortalScriptPathFragment (Optional; Default: portal/? Note:&nbsp; This is<BR>&gt; the script the user will be sent to after a successful login.)<BR><BR>You can't do it there.<BR><BR>&gt; This will hopefully be moved to the Auth server in the near future...<BR><BR>Most of the work is done, all that's required is a new node/network config<BR>similar to the one for custom portal URL.&nbsp; There is already a documented<BR>variable in the code for the original destination URL.<BR>--<BR>Benoit Grégoire<BR>Technologies Coeus inc.<BR></FONT></P></DIV></BODY></HTML>