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

Jan Schneider jan at horde.org
Fri Sep 5 07:55:07 UTC 2008


Maybe: http://bugs.horde.org/ticket/6371

Zitat von Luis Felipe Marzagao/Andamentos <lfbm.andamentos at gmail.com>:

> In the portal view the name is correctly displayed:
> http://img217.imageshack.us/my.php?image=00backendviewfl4.jpg
>
>
> It is correctly inserted in the backend also (MySQL):
> http://img152.imageshack.us/my.php?image=01portalviewsm7.jpg
>
>
> But in the contacts, calendars, tasks and mnemo it appears with the  
> appended domain:
> http://img221.imageshack.us/my.php?image=02contactsviewsd4.jpg
> http://img209.imageshack.us/my.php?image=03calendarviewsw1.jpg
> http://img73.imageshack.us/my.php?image=04tasksviewko5.jpg
> http://img50.imageshack.us/my.php?image=05notesviewsa9.jpg
>
>
> Here are the hook functions:
>
> *horde/imp/config/hooks.php:*
>
> 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);
>         }
>     }
> }
>
>
> *horde/config/hooks.php:*
>
> 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;
>          }
> }
>
>
> Thanks,
> 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.
>>
>



Jan.

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



More information about the horde mailing list