<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> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </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->PortalOriginalUrl() && $network->getPortalOriginalUrlAllowed()) <BR> { <BR> header("Location: " . SESS_ORIGINAL_URL_VAR"); <BR> }</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT> </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"> /** <BR> * Are nodes allowed to redirect users to the original requested web page instead of <BR> * the portal? <BR> * <BR> * @return bool True or false <BR> * <BR> * @access public <BR> */ <BR> public function getPortalOriginalUrlAllowedAllowed() <BR> { <BR> return (($this->_row['allow_original_URL_redirect'] == 't') ? true : false); <BR> } <BR> <BR> /** <BR> * Set if nodes are allowed to redirect users to the original requested web page <BR> * instead of the portal? <BR> * <BR> * @param bool $value The new value, true or false <BR> * <BR> * @return bool True on success, false on failure <BR> * <BR> * @access public <BR> */ <BR> public function setCustomPortalRedirectAllowed($value) <BR> { <BR> // Init values <BR> $retval = true; <BR> <BR> if ($value != $this->getCustomPortalRedirectAllowed()) { <BR> $db = AbstractDb::getObject(); <BR> $value ? $value = 'TRUE' : $value = 'FALSE'; <BR> $retval = $db->execSqlUpdate("UPDATE networks SET allow_original_URL_redirect = {$value} WHERE network_id = '{$this->getId()}'", false); <BR> $this->refresh(); <BR> } <BR> <BR> return $retval; <BR> } </FONT></DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT> </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> </DIV>
<DIV dir=ltr><FONT face="Courier New"></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New"> /** redirect users to the original requested web page instead of portal <BR> Must be enabled in the Network configuration to have any effect <BR> @return a string */ <BR> function PortalOriginalUrl() <BR> { <BR> return (($this->_row['allow_original_URL_redirect'] == 't') ? true : false); <BR> } <BR> <BR> /** redirect users to the original requested web page instead of portal <BR> Must be enabled in the Network configuration to have any effect <BR> @return true on success, false on failure */ <BR> function setCustomPortalRedirectUrl($value) <BR> { <BR> $retval = true; <BR> if ($value != $this->getCustomPortalRedirectUrl()) <BR> { <BR> $db = AbstractDb::getObject(); <BR> $value = $db->escapeString($value); <BR> $retval = $db->execSqlUpdate("UPDATE nodes SET allow_original_URL_redirect = '{$value}' WHERE node_id = '{$this->getId()}'", false); <BR> $this->refresh(); <BR> } <BR> return $retval; <BR> } <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>> You can do this in the nodes wifidog.config:<BR>><BR>> # PortalScriptPathFragment (Optional; Default: portal/? Note: This is<BR>> the script the user will be sent to after a successful login.)<BR><BR>You can't do it there.<BR><BR>> 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. 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>