[imp] Login without Domain, hook_vinfo help!
Ryan Beatty
ryan.beatty at gmail.com
Fri Jun 9 23:19:40 PDT 2006
Try it with 'username'
function _imp_hook_vinfo($type = 'username')
{
$vdomain = getenv('HTTP_HOST');
$vdomain = 'pop-ro.rnp.br'
$vdomain = preg_replace('|^mail\.|i', '', $vdomain);
Because its not going into the IF condition for type 'username' and
inserting the username.
Good luck !
On 6/9/06, carlos maca <macacohorde at gmail.com> wrote:
>
> I want to login without the domain, only with the username. *Jan
> Schneider,
> give me a answer to search for the vinfo, and i find it on hooks.php on
> /horde/config, but i try it and cant do it at all, can someone give me a
> help in how to configure (_imp_hook_vinfo) line 765-702. Here is the copy
> of
> the hook:
> // 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 = 'vdomain')
> {
> $vdomain = getenv('HTTP_HOST');
> $vdomain = 'pop-ro.rnp.br'
> $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);
> }
> }
> }
>
> *
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>
More information about the imp
mailing list