[horde] Horde / passwd menuing problem Notice: Undefined index:

Tracy Drummond tracy.drummond at callisma.com
Sat Feb 14 04:41:10 PST 2004


I am using only Horde and Passwd.  My requirement is to provide a password
change utility to users through a web browser.

I have successfully done this but I have a slight bug that I cannot seem to
fix.  I want it to always return to passwd or go from horde to passwd
automagically.  Here is the current behaviour:

Scenerio
A  -----------------------------------------------------------------
1> Users browses to  //myurl/horde/
Enters the horde login screen   (using 'ftp' authentication)
At the the screen bottom a message appears
Notice: Undefined index: status in /var/www/html/horde/menu.php on line 34
(And a Horde clickable button that brings you back to horde login screen)
2>User authenticates and it takes them to a blank page that has an
additional error message at the top of the page
Notice: Undefined index: status in /var/www/html/horde/lib/Registry.php on
line 160
And still has the error on the bottom of the page.
Notice: Undefined index: status in /var/www/html/horde/menu.php on line 34

Scenerio#B -----------------------------------------------------------------
---
1>Users browses to  //myurl/horde/passwd/
the url changes to
(//myurl/horde/login.php?url=%2Fhorde%2Fpasswd%2Findex.php)

Enters the horde login screen   (using 'ftp' authentication)
2>User authenticates and it takes them to the user passwd utility
3>User changes password - which works and does change passwords fine
(backend poppasswd)
Password Changed appears and the user can keep changing password or logout
4>User logs out and a message appears
You have been logged out.
Thank you for using the system.
The url changes to //myurl/horde/login.php?reason=logout
and the message appears
Notice: Undefined index: status in /var/www/html/horde/lib/Registry.php on
line 160
-------------------------------------------------
Here is the set up and some snippets of the files

/var/www/html/horde     (where /var/www/html is httpd document root)
/var/www/html/horde/passwd

poppasswd installed


The code--------------------------------------

/var/www/html/horde/menu.php
<?php
/*
 * $Horde: horde/menu.php,v 2.14.2.12 2003/01/03 12:57:45 jan Exp $
 *
 * Copyright 1999-2003 Charles J. Hagenbuch <chuck at horde.org>
 * Copyright 1999-2003 Jon Parise <jon at horde.org>
 *
 * See the enclosed file COPYING for license information (LGPL).  If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */

define('HORDE_BASE', dirname(__FILE__));
require_once HORDE_BASE . '/lib/base.php';
require_once HORDE_BASE . '/lib/Menu.php';

/* Define target */
$opener = false;
if ($conf['menu']['floating_bar'] &&
(!$browser->hasQuirk('avoid_popup_windows')
)) {
    $opener = true;
    $title = _("Horde System");
}
$js_onLoad = null;
require HORDE_TEMPLATES . '/common-header.inc';

/* Build the menu out of the modules array */
$moduletext = '';

/*
 * Now print a link for each module (no links are fine since there
 * will be other stuff here)
 */
foreach ($registry->applications as $service => $params) {
    if ($params['status'] == 'active') {
        if (!$opener) {
            $moduletext .= Menu::createItem(Horde::url($params['webroot'] .
'/'
. (isset($params['initial_page']) ? $params['initial_page'] : '')),
                                            gettext($params['name']),
$params['i
con'], '', 'horde_main');
        } else {
            $moduletext .= Menu::createItem('', gettext($params['name']),
$param
s['icon'],
                                            '', 'horde_main',
                                            'window.opener.location.href=\''
. H
orde::url($params['webroot']) . '\'; return false;');
        }
    }
}

/* Add a logout link */
//$moduletext .=
Menu::createItem(Horde::applicationUrl('login.php?reason=logout
'), _("Log out"), 'logout.gif', null, 'horde_main');

require HORDE_TEMPLATES . '/horde/modules.inc';
require HORDE_TEMPLATES . '/common-footer.inc';

?>

------------------------------------

PLEASE give me some direction - I installed and learned this stuff in a day
but am in a time crunch to have this working :-)

Tracy




More information about the horde mailing list