[dev] Issue with imp_get_vinfo - Current Head cvs.

Jan Schneider jan@horde.org
Tue, 25 Jun 2002 16:59:15 +0200


Zitat von Edwin Culp <eculp@encontacto.net>:

> 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);
>         }
>     }
> }

Try using $_SESSION['imp']['user'] instead.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft