[#3166] Sideeffects of _prefs_hook_fullname on calendars
Summary Sideeffects of _prefs_hook_fullname on calendars
Queue Kronolith
Queue Version 2.0.5
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at)
Requester heinz.sporn (at) sporn-it (dot) com
Created 2005-12-18 (4838 days ago)
Updated 2006-06-16 (4658 days ago)
Assigned 2005-12-21 (4835 days ago)
Resolved 2006-06-16 (4658 days ago)
Patch No

2006-06-16 09:33:43 Jan Schneider Comment #3
State ⇒ Resolved
Reply to this comment
Can't reproduce this anymore with the current code.
2005-12-21 17:07:14 Chuck Hagenbuch Comment #2
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
Sounds like an incorrect reliance on the name of the share instead of 
its id... we'll take a look.
2005-12-18 11:52:44 heinz (dot) sporn (at) sporn-it (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Sideeffects of _prefs_hook_fullname on calendars
Queue ⇒ Kronolith
Reply to this comment
If you use a _prefs_hook_fullname function to assemble user names for 
their default identity you will recognize a very strange effect in "My 
Calendars" for new users i.e. users  who enter Horde for the first time.

Steps to reproduce:

1. Create the function hook and enable it in horde/config/prefs.php:


if (!function_exists('_prefs_hook_fullname')) {

         function _prefs_hook_fullname($name = null) {

                 if (is_null($name)) {

                         $name = Auth::getAuth();


                 if (!empty($name)) {

                         $cmd  = '/usr/local/bin/getldapfullname ' . $name;

                         return (`$cmd`);


                 return '';



2. Verify that the hook actually returns a users correct full name 
e.g. by looking into Options / Personal Information

3. Now enter Horde with a brand new user and select Calendar / My Calendars

4. Select the users calender in the "Select a calendar" comb box. The 
calendars name will be "fullname's calendar" where fullname is the 
name returned from the above hook.

5. Now to the strange effect:

The Permissions button will not be displayed. Even if you disable the 
hook again and re-enter Horde with the user in question the behavior 
does not change.

6. Workaround:

select * from horde_datatree where user_uid='xxx';

update horde_datatree_attributes set attribute_value='yyy' where 
datatree_id='zzz' and attribute_name='name';

xxx should be the users uid

yyy should be the users uid + "s Calendar" (or whatever language 
specific tag has to follow, e.g. "s Kalender" in a German environment)

zzz should be the entry number matching the according value returned 
from the first select statement..

Saved Queries