[imp] Where to After Login? -- Clarification

Vasilios Hoffman vhoffman01 at wesleyan.edu
Mon Mar 31 13:14:17 PST 2003


Hi folks,

I have been monitoring this thread via the MARC archive:

******

Both the suggestions below are already set. Everything was working fine
until I upgraded to the latest releaseversion.

Any more suggestions?

Thanks,

    Mark

> > > In horde/config/registry.php, uncomment the following two lines:
> > >
> > > $this->registry['auth']['login'] = 'imp';
> > > $this->registry['auth']['logout'] = 'imp';
> > >
> > > This sets up Horde to let IMP do the authentication for it.  If that is
> > > not enough to get it to go straight to IMP, let me know and I'll did
> > > through my config files further.

>
> /horde/prefs.php
>
> // what application should we go to after login?
> $_prefs['initial_application'] = array(
>     'value' => 'imp',
>     'locked' => false,
>     'shared' => true,
>     'type' => 'select',
>     'desc' => _("What application should Horde display after login?"));
>
> try that,
> Nate
>

*****

and I wanted to share what I had to do in order to make things work as I
wanted and I believe as Mark also wants.  My configuration places /horde
as my webroot so when you do https://address.blah/ you get the horde login
page.  I want folks to login, and go directly to their IMP inbox (not the
folder view, but the list of messages in their inbox) but have addressbook
and other horde applications availible.

Now, if there's a better way of doing this (including the hack I had to do
which I'll explain in a bit) please let me know the official, proper way
of setting this up.  Making heads or tails of the various configuration
options is, no offense, a horrific headache :(  I like hte multitude of
options, so I won't complain overmuch.

I did the above (initial_application plus login controlled through IMP),
plus the following:

$this->applications['horde'] = array(
    'fileroot' => dirname(__FILE__) . '/..',
    'webroot' => '/horde',
    'initial_page' => 'imp/login.php',
    'icon' => '/horde/graphics/home.gif',
    'name' => _("Horde"),
    'allow_guests' => true,
    'status' => 'hidden',
    'templates' => dirname(__FILE__) . '/../templates',
    'cookie_domain' => $_SERVER['SERVER_NAME'],
    'cookie_path' => '/horde',
    'server_name' => $_SERVER['SERVER_NAME'],
    'server_port' => $_SERVER['SERVER_PORT']
);

$this->applications['logout'] = array(
    'fileroot' => dirname(__FILE__) . '/..',
    'webroot' => $this->applications['horde']['webroot'],
    'initial_page' => 'imp/login.php?reason=logout',
    'icon' => $this->applications['horde']['webroot'] .
'/graphics/logout.gif',
    'name' => _("Logout"),
    'allow_guests' => false,
    'status' => 'notoolbar
);

the key lines being the 'initial_page' => 'imp/login.php' and
'initial_page' => 'imp/login.php?reason=logout'.  this allowed me to go
login at that horde application page, and get shot to the imp login page
which shoots me off to the inbox.  seemed to work.

The only problem with this, si that when I logged out with the HORDE
logout button (on the bottom of the page) and not the one on the top of
the page that comes from IMP -- any re-logins would stick me at my folder
view.  the logout button at the top of the page did not do this, it
shuttled me to my inbox (mailbox.php) as desired, it was only the horde
generated logout button...

I watched my logs, etc, and the horde logout button was sending me to
%application%/login.php?reason=logoutetc as desired.  I tracked it down,
and found that if I modified imp/redirect.php from:

if (Horde::getFormData('url')) {
	$url = Horde::getFormData('url');
	$url = IMP::addParameter($url, 'actionID=' . $actionID);
} else {
            $url = _getInitialUrl($actionID);
}

to:

//if (Horde::getFormData('url')) {
//    $url = Horde::getFormData('url');
//    $url = IMP::addParameter($url, 'actionID=' . $actionID);
//} else {
      $url = _getInitialUrl($actionID);
//}

than it worked fine.  I won't attempt to understand your code enough to
figure out the intention of that switch, but perhaps there is either a
flaw in the logic for it's existence, or a more proper solution through
modification fo your config files...

if so let me know.

And Mark, let me know if the above works for you...

cheers,

-V Hoffman

Vasilios Hoffman
Junior Unix Administrator
Wesleyan University
voice (860) 685-3142
fax (860) 685-2401



More information about the imp mailing list