[Tickets #3166] NEW: Sideeffects of _prefs_hook_fullname on calendars

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Dec 18 03:52:44 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3166
-----------------------------------------------------------------------
 Ticket             | 3166
 Created By         | heinz.sporn at sporn-it.com
 Summary            | Sideeffects of _prefs_hook_fullname on calendars
 Queue              | Kronolith
 Version            | 2.0.5
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


heinz.sporn at sporn-it.com (2005-12-18 03:52) wrote:

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..







More information about the bugs mailing list