cvs: pear /Perm_LiveUser/docs/examples/example1 conf.php example.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sat, 24 Apr 2004 01:00:43 +0000 |
| Subject: | cvs: pear /Perm_LiveUser/docs/examples/example1 conf.php example.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-18661@lists.php.net to get a copy of this message | ||
dufuz Fri Apr 23 21:00:43 2004 EDT
Modified files:
/pear/Perm_LiveUser/docs/examples/example1 conf.php example.php
Log:
Small update
http://cvs.php.net/diff.php/pear/Perm_LiveUser/docs/examples/example1/conf.php?r1=1.4&r2=1.5&ty=u
Index: pear/Perm_LiveUser/docs/examples/example1/conf.php
diff -u pear/Perm_LiveUser/docs/examples/example1/conf.php:1.4
pear/Perm_LiveUser/docs/examples/example1/conf.php:1.5
--- pear/Perm_LiveUser/docs/examples/example1/conf.php:1.4 Sun Mar 28 14:05:49 2004
+++ pear/Perm_LiveUser/docs/examples/example1/conf.php Fri Apr 23 21:00:42 2004
@@ -15,7 +15,15 @@
//ini_set('include_path', $path_to_liveuser_dir.ini_get('include_path') );
if (is_readable('Auth_XML.xml')) {
+ $xml_is_readable = false;
+}
+is_writable('Auth_XML.xml')) {
+ $xml_is_writable = false;
+}
+if ($xml_is_readable != false && $xml_is_writable != false) {
$xml_is_readable = true;
+ $xml_is_writable = true;
+
$liveuserConfig = array('session' => array('name' =>
'PHPSESSID','varname' => 'loginInfo'),
'login' => array('username' =>
'handle', 'password' => 'passwd'),
'logout' => array('trigger' =>
'logout', 'method' => 'get'),
@@ -29,8 +37,8 @@
'passwordEncryptionMode' => 'MD5'
)
)
- );
-} else {
- $xml_is_readable = false;
+ );
+ // Get LoginManager class definition
+ require_once 'LiveUser.php';
}
?>
\ No newline at end of file
http://cvs.php.net/diff.php/pear/Perm_LiveUser/docs/examples/example1/example.php?r1=1.5&r2=1.6&ty=u
Index: pear/Perm_LiveUser/docs/examples/example1/example.php
diff -u pear/Perm_LiveUser/docs/examples/example1/example.php:1.5
pear/Perm_LiveUser/docs/examples/example1/example.php:1.6
--- pear/Perm_LiveUser/docs/examples/example1/example.php:1.5 Sun Mar 28 14:05:49 2004
+++ pear/Perm_LiveUser/docs/examples/example1/example.php Fri Apr 23 21:00:42 2004
@@ -12,20 +12,17 @@
* No permission management is supported.
*
* @author Björn Kraus <krausbn@php.net>
- * @version $Id: example.php,v 1.5 2004/03/28 19:05:49 dufuz Exp $
+ * @version $Id: example.php,v 1.6 2004/04/24 01:00:42 dufuz Exp $
**/
error_reporting(E_ALL);
// Get LiveUser configuration array
require_once 'conf.php';
-if ($xml_is_readable == false) {
- die('<p style="color: red; text-align: center;">The XML file isn\'t
readable. Add the right permissions to it and then try again.</p>');
+if ($xml_is_readable == false || $xml_is_writable == false) {
+ die('<p style="color: red; text-align: center;">The XML file isn\'t
readable/writable. Add the right permissions to it and then try again.</p>');
}
-// Get LoginManager class definition
-require_once 'LiveUser.php';
-
// The error handling stuff is not needed and used only for debugging
// while LiveUser is not yet mature
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'eHandler');
@@ -149,6 +146,11 @@
<p align="center"><a
href="example.php?logout=1">Logout</a></p>
<?php
// Just some more debug output with no further relevance
+echo '<hr />Handle:';
+print_r($LU->getProperty('handle'));
+echo '<br />User Type:';
+print_r($LU->getProperty('userType'));
+
echo '<hr /><pre>';
print_r($LU);
echo '<hr />';
@@ -156,11 +158,6 @@
echo '<hr />';
print_r($_POST);
echo '</pre>';
-
-echo '<br />Handle:';
-print_r($LU->getProperty('handle'));
-echo '<br />User Type:';
-print_r($LU->getProperty('userType'));
?>
</body>
</html>
\ No newline at end of file