[Tickets #7877] Re: removing user data

bugs at horde.org bugs at horde.org
Wed Jan 21 16:16:02 UTC 2009


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

Ticket URL: http://bugs.horde.org/ticket/7877
------------------------------------------------------------------------------
  Ticket             | 7877
  Updated By         | dom.lalot at gmail.com
  Summary            | removing user data
  Queue              | Turba
  Version            | 2.3.1
  Type               | Enhancement
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


dom.lalot at gmail.com (2009-01-21 11:16) wrote:

> removeUserData isn't supported by the LDAP driver.

Hello Chuck

I understand that for ldap, but not for the sql side

In my sources.php

$cfgSources['localsql'] = array(
     'title' => _("My Address Book"),
     'type' => 'sql',
..
     'export' => true,
     'browse' => true,
     'use_shares' => true,
     'list_name_field' => 'lastname',
);

$cfgSources['localldap'] = array(
     'title' => 'Annuaire U2',
     'type' => 'ldap',
..
     'strict' => array('dn','mail'),
     'browse' => true,
     'export' => false
);

My localsql data should have been cleaned, no?

I've seen strange behaviour that can explain something, if I make ldap  
not browsable (I would), I can't browse localsql. Seems there is a  
single api for both sources

Just trying to debug:

in horde-webmail-1.2.1/turba/lib/api.php (line 234)
     /* Only attempt share removal if we have shares configured */
     if ($_SESSION['turba']['has_share']) {
         $shares = &$GLOBALS['turba_shares']->listShares(
             $user, PERMS_EDIT, $user);

         /* Look for the deleted user's default share and remove it */
         foreach ($shares as $share) {
                     Horde::logMessage('tracedom3  
'.$share->get('params'), __FILE__, __LINE__, PEAR_LOG_ERR);
             $params = @unserialize($share->get('params'));
             /* Only attempt to delete the user's default share */
             if (!empty($params['default'])) {
                 $config = Turba::getSourceFromShare($share);
                 $driver = &Turba_Driver::singleton($config);
                 $result = $driver->removeUserData($user);
                 if (is_a($result, 'PEAR_Error')) {
                     Horde::logMessage($result, __FILE__, __LINE__,  
PEAR_LOG_ERR);
                     $hasError = true;
                 }
             }
         }

  $share->get('params') returns nothing, so localsql is not cleaned

Data was in turba_shares
share_id 	share_name 	share_owner 	share_flags 	perm_creator  
	perm_default 	perm_guest 	attribute_name 	attribute_desc  
	attribute_params
103  	r9906146  	r9906146  	0  	0  	0  	0  	Carnet d'adresses de  
Emmanuel XX  	NULL  	NULL

Hope this helps







More information about the bugs mailing list