[imp] Login without Domain, Help again!

Jan Schneider jan at horde.org
Thu Jun 29 01:46:12 PDT 2006


Keep discussions on the list!

Zitat von carlos maca <macacohorde at gmail.com>:

> I know that to configure the login without the @domain, is in the function
> vinfo, in hooks.php, but i dont know how it works, i cant understand it at
> all.
>
> i want to use this function on my domain, i tried it with username, and
> domain, but i still cant do it.
> please help me in this journey (rs),  my domain is = pop-ro.rnp.br
> Here is the vinfo function, where i modify it using my domain:

You need at least some basic PHP knowledge to use the hooks. The  
example you pasted below even tells you where to put your domain: in  
$vdomain.

> Here is an example _imp_hook_vinfo function. If $type == 'vdomain', this
> // function returns the HTTP_HOST variable after removing the 'mail.'
> // subdomain.
> //
> // If $type == 'username', this function returns a unique username composed
> of
> // $_SESSION['imp']['user'] + vdomain.
> //
> // ex. $HTTP_HOST = 'mail.mydomain.com', $_SESSION['imp']['user'] =
> 'myname':
> //   $vdomain  = 'mydomain.com'
> //   $username = 'myname_mydomain_com'
>
> // if (!function_exists('_imp_hook_vinfo')) {
> //     function _imp_hook_vinfo($type = 'username')
> //     {
> //         $vdomain = getenv('HTTP_HOST');
> //         $vdomain = preg_replace('|^mail\.|i', '', $vdomain);
> //         $vdomain = String::lower($vdomain);
> //
> //         if ($type == 'username') {
> //             return preg_replace('|\.|', '_', $_SESSION['imp']['user'] .
> '_' . $vdomain);
> //         } elseif ($type == 'vdomain') {
> //             return $vdomain;
> //         } else {
> //             return PEAR::raiseError('invalid type: ' . $type);
> //         }
> //     }
> // }
>
> thnks for the help!



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the imp mailing list