6.0.0-beta1
7/8/25

[#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 12/18/2005 (7142 days ago)
Due
Updated 06/16/2006 (6962 days ago)
Assigned 12/21/2005 (7139 days ago)
Resolved 06/16/2006 (6962 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/16/2006 09:33:43 AM Jan Schneider Comment #3
State ⇒ Resolved
Reply to this comment
Can't reproduce this anymore with the current code.
12/21/2005 05:07:14 PM 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.
12/18/2005 11:52:44 AM heinz (dot) sporn (at) sporn-it (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
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:



Example:



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