[horde] Does username hooks apply to calendars, tasks etc?

Luis Felipe Marzagao/Andamentos lfbm.andamentos at gmail.com
Fri Sep 5 01:41:00 UTC 2008

In the portal view the name is correctly displayed:

It is correctly inserted in the backend also (MySQL):

But in the contacts, calendars, tasks and mnemo it appears with the 
appended domain:

Here are the hook functions:


 if (!function_exists('_imp_hook_vinfo')) {
     function _imp_hook_vinfo($type = 'username')

         $vdomain = 'azevedomarques.adv.br';
         if ($type == 'username') {

             return $_SESSION['imp']['user'] . '+' . $vdomain;
         } elseif ($type == 'vdomain') {
             return $vdomain;
         } else {
             return PEAR::raiseError('invalid type: ' . $type);


 if (!function_exists('_username_hook_frombackend')) {
     function _username_hook_frombackend($userID) {

         $vdomain = '+azevedomarques.adv.br';

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

         return $userID;


 if (!function_exists('_username_hook_tobackend')) {
     function _username_hook_tobackend($userID) {

         $vdomain = 'azevedomarques.adv.br';

         return $userID . '+' . $vdomain;

Luis Felipe (duli)

Jan Schneider escreveu:
> Zitat von Luis Felipe Marzagao/Andamentos <lfbm.andamentos at gmail.com>:
>> I have successfully set up username hooks in order to add or strip 
>> the domain name from/to the userid, so my users see "john" instead of 
>> "john at example.com". But it only works on the horde portal view. When 
>> the user clicks on calendars, task or mnemo, the sidebar shows 
>> "john at example.com" instead of just "john". So I wonder if the 
>> username hooks are globally applied to all horde modules (in which 
>> case I´m doing something wrong) and in case it´s not meant to be 
>> global, how could manage to do it?
> Where does it show those user names?
> Jan.

More information about the horde mailing list