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 |
State ⇒ Resolved
Assigned to
State ⇒ Assigned
its id... we'll take a look.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Sideeffects of _prefs_hook_fullname on calendars
Queue ⇒ Kronolith
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..