[horde] Username hooks

Luis Felipe Marzagao/Andamentos lfbm.andamentos at gmail.com
Mon Sep 1 18:33:54 UTC 2008


Hello:

I have a webhosted Horde Groupware Webmail Edition on Hostmonster. The 
IMAP users are always 'username+example.com'.

In order to authenticate users without typing 'username+example.com' at 
login screen, I set up the IMP VINFO HOOK, so the users can type only 
'username'.

It works just fine. But the userid that is displayed, for example, on 
calendar lists, always show as 'username+example.com', and it gets too big.

Is it possible to set up another hook or a configuration to strip the 
'+example.com' from the displayed userid?

I tried the horde username tobackend function, like this, but it doesn´t 
work:

if (!function_exists('_username_hook_tobackend')) {
     function _username_hook_tobackend($userID)
     {
         $vdomain = '+azevedomarques.adv.br';

         if (substr($userID, -strlen($vdomain)) == $vdomain) {
             $userID = substr($userID, 0, -strlen($vdomain));
         }

         return $userID;
     }
 }

I´d appreciate any help.

Thanks.
Luis Felipe (duli)


More information about the horde mailing list