Revision: 1220
http://mrbs.svn.sourceforge.net/mrbs/?rev=1220&view=rev
Author: jberanek
Date: 2009-10-18 15:35:24 +0000 (Sun, 18 Oct 2009)
Log Message:
-----------
* Patch from Emmanuel Dreyfus to add a configuration variable to configure
a login link for the "remote_user" authentication scheme.
Modified Paths:
--------------
mrbs/trunk/web/session_remote_user.inc
mrbs/trunk/web/systemdefaults.inc.php
Modified: mrbs/trunk/web/session_remote_user.inc
===================================================================
--- mrbs/trunk/web/session_remote_user.inc 2009-10-18 15:30:55 UTC (rev
1219)
+++ mrbs/trunk/web/session_remote_user.inc 2009-10-18 15:35:24 UTC (rev
1220)
@@ -8,8 +8,12 @@
*
*
* Notes To use this session scheme, set in config.inc.php:
*
* $auth['session'] = 'remote_user';
*
-* $auth['type'] = 'none';
+* $auth['type'] = 'none';
*
*
*
+*
*
+* If you want to display a login link, set in
config.inc.php: *
+* $auth['remote_user']['login_link'] = '/login/link.html';
*
+*
*
* If you want to display a logout link, set in
config.inc.php: *
* $auth['remote_user']['logout_link'] =
'/logout/link.html'; *
*
*
@@ -79,13 +83,22 @@
(!empty($auth['remote_user']['logout_link'])))
{
print '<a href="' . $auth['remote_user']['logout_link'] .'">' .
get_vocab('logoff') . "</a>\n";
- }
+ }
}
else
{
- echo "<p class=\"error\">Error: REMOTE_USER was not set when it should
have been.</p>";
- exit;
+ if (isset($auth['remote_user']['login_link']) &&
+ is_string($auth['remote_user']['login_link']) &&
+ (!empty($auth['remote_user']['login_link'])))
+ {
+ print '<a href="' . $auth['remote_user']['login_link'] .'">' .
get_vocab('login') . "</a>\n";
+ }
+ else
+ {
+ echo "<p class=\"error\">Error: REMOTE_USER was not set when it should
have been.</p>";
+ exit;
+ }
}
}
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2009-10-18 15:30:55 UTC (rev
1219)
+++ mrbs/trunk/web/systemdefaults.inc.php 2009-10-18 15:35:24 UTC (rev
1220)
@@ -429,6 +429,7 @@
$auth["realm"] = "mrbs";
// 'session_remote_user' configuration settings
+//$auth['remote_user']['login_link'] = '/login/link.html';
//$auth['remote_user']['logout_link'] = '/logout/link.html';
// 'auth_ext' configuration settings
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits