[dev] Issue with imp_get_vinfo - Current Head cvs.
Edwin Culp
eculp@encontacto.net
Tue, 25 Jun 2002 07:46:07 -0700
Quoting Eric Rostetter <eric.rostetter@physics.utexas.edu>:
| Quoting Edwin Culp <eculp@encontacto.net>:
|
| > I just did a cvs update for the first time in about a week. I updated
| > my configuration files and when I try to login there is an issue with
| > the imp_get_vinfo function.
|
| I think this was due to a change made in the last day or so, which allows
| the person's identity to override the get_vinfo hook. Check the cvs
| changes/diffs for IMP.php for details.
|
| > Is anyone else seeing this with virtual users and domains using
| > imp_get_vinfo?
|
| I don't use vinfo or virtual users/domains, so I don't have an issue.
| But if you look at the cvs for the last day or two, or search the mailing
| list archives (dev, cvs, imp) for the last day or so, you should see
| the comments about the changes made and why they were made.
Eric,
Thanks again. I have gone through all the changes to IMP.php and can only
find changes in $_SESSION that don't seem to be the problem although if I
revert back IMP.php my login works :-( and with the new version I seem to
loose the initial imp['user'] variable, the value entered in the login
form. I just don't get it. I don't make any other changes. I don't use
realm's. The correct domain is shown in the slapd.log but without the
user id that is built in the imp_get_vinfo function. It works fine with
the old IMP.php.
Here is the imp_get_vinfo function, just in case someone can see something.
$conf['hooks']['vinfo'] = 'imp_get_vinfo';
if (!function_exists('imp_get_vinfo')) {
function imp_get_vinfo ($type = 'username') {
global $conf, $imp;
$vdomain = strtolower(preg_replace('|^mail\.|i', '',
$_SERVER['HTTP_HOST']));
if ($type == 'username') {
return $imp['user'] . '@' . $vdomain;
} elseif ($type == "vdomain") {
return $vdomain;
} else {
return new PEAR_Error('invalid type: ' . $type);
}
}
}
The slapd.log entry with the new IMP.php
Jun 25 07:06:47 worldinternet slapd[28556]: conn=1 op=7 SRCH
base="ou=people,o=worldinternet.org" scope=2 filter="(&(mail=@worldinternet.org))"
^^^^^^^
The slapd.log entry with the old IMP.php and no other changes:
Jun 25 07:43:11 worldinternet slapd[28556]: conn=12 op=2 SRCH
base="ou=people,o=worldinternet.org" scope=2
filter="(mail=eculp@worldinternet.org)"
I am able to login but do get an expected error:
Fatal error: Call to undefined function: checkauthentication() in
/usr/src/horde/imp/mailbox.php on line 98
I would appreciate any help or suggestions, I am at a total loss as to
why this is happening.
Thanks,
ed