<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>removing user data</title> 
  <pubDate>Fri, 10 Apr 2026 13:36:26 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7877</link> 
  <atom:link rel="self" type="application/rss+xml" title="removing user data" href="https://bugs.horde.org/ticket/7877/rss" /> 
  <description>removing user data</description> 
 
   
   
  <item> 
   <title>Jan 21 14:20:22 HORDE [error] [turba] Removing user data is </title> 
   <description>Jan 21 14:20:22 HORDE [error] [turba] Removing user data is not supported in the current address book storage driver. [pid 17683 on line 221 of &quot;/var/www/perso/horde-webmail-1.2.1/turba/lib/api.php&quot;]



I followed Jan instruction for using the api to remove users, but in turba I got that error. That should be nice to get it working!



I have one localsql source in share mode and one in ldap mode.



And in SQL, I kept all the data from invalid users



Is it enhancement or bug?



Thanks



Dom</description> 
   <pubDate>Wed, 21 Jan 2009 14:06:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7877#t51882</link> 
  </item> 
   
  <item> 
   <title>removeUserData isn&#039;t supported by the LDAP driver.</title> 
   <description>removeUserData isn&#039;t supported by the LDAP driver.</description> 
   <pubDate>Wed, 21 Jan 2009 15:19:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7877#t51884</link> 
  </item> 
   
  <item> 
   <title>&gt; removeUserData isn&#039;t supported by the LDAP driver.



Hell</title> 
   <description>&gt; removeUserData isn&#039;t supported by the LDAP driver.



Hello Chuck



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



In my sources.php



$cfgSources[&#039;localsql&#039;] = array(

    &#039;title&#039; =&gt; _(&quot;My Address Book&quot;),

    &#039;type&#039; =&gt; &#039;sql&#039;,

..

    &#039;export&#039; =&gt; true,

    &#039;browse&#039; =&gt; true,

    &#039;use_shares&#039; =&gt; true,

    &#039;list_name_field&#039; =&gt; &#039;lastname&#039;,

);



$cfgSources[&#039;localldap&#039;] = array(

    &#039;title&#039; =&gt; &#039;Annuaire U2&#039;,

    &#039;type&#039; =&gt; &#039;ldap&#039;,

..

    &#039;strict&#039; =&gt; array(&#039;dn&#039;,&#039;mail&#039;),

    &#039;browse&#039; =&gt; true,

    &#039;export&#039; =&gt; false

);



My localsql data should have been cleaned, no?



I&#039;ve seen strange behaviour that can explain something, if I make ldap not browsable (I would), I can&#039;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[&#039;turba&#039;][&#039;has_share&#039;]) {

        $shares = &amp;$GLOBALS[&#039;turba_shares&#039;]-&gt;listShares(

            $user, PERMS_EDIT, $user);



        /* Look for the deleted user&#039;s default share and remove it */

        foreach ($shares as $share) {

                    Horde::logMessage(&#039;tracedom3 &#039;.$share-&gt;get(&#039;params&#039;), __FILE__, __LINE__, PEAR_LOG_ERR);

            $params = @unserialize($share-&gt;get(&#039;params&#039;));

            /* Only attempt to delete the user&#039;s default share */

            if (!empty($params[&#039;default&#039;])) {

                $config = Turba::getSourceFromShare($share);

                $driver = &amp;Turba_Driver::singleton($config);

                $result = $driver-&gt;removeUserData($user);

                if (is_a($result, &#039;PEAR_Error&#039;)) {

                    Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR);

                    $hasError = true;

                }

            }

        }



 $share-&gt;get(&#039;params&#039;) 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&#039;adresses de Emmanuel XX  	NULL  	NULL



Hope this helps

</description> 
   <pubDate>Wed, 21 Jan 2009 16:16:02 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7877#t51886</link> 
  </item> 
   
  <item> 
   <title>Currently the removeUserData api will only attempt to remove</title> 
   <description>Currently the removeUserData api will only attempt to remove a user&#039;s *default* share to reduce the possibility of accidentally deleting shares that other users may have data in.  A default share is only designated as a default share if, when the user initially logs in, there is *no* other source that the user has access to.



So, my guess is that your &#039;localsql&#039; shares that are not being removed are not defined as &#039;default&#039; shares.</description> 
   <pubDate>Sun, 01 Feb 2009 18:45:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7877#t52182</link> 
  </item> 
   
  <item> 
   <title>Oops.. Sorry for the delay, I did not see your post



&gt; Cur</title> 
   <description>Oops.. Sorry for the delay, I did not see your post



&gt; Currently the removeUserData api will only attempt to remove a user&#039;s 

&gt; *default* share to reduce the possibility of accidentally deleting 

&gt; shares that other users may have data in.  A default share is only 

&gt; designated as a default share if, when the user initially logs in, 

&gt; there is *no* other source that the user has access to.

&gt;

&gt; So, my guess is that your &#039;localsql&#039; shares that are not being 

&gt; removed are not defined as &#039;default&#039; shares.



What do you mean?



in turba prefs.php



// Address books to be displayed in the address book selection widget

// and in the Browse menu item.  The address book name is stored using

// the source key from sources.php (e.g. &quot;localsql&quot;).  Separate

// entries with &quot;\n&quot; , e. g. &#039;value&#039; =&gt; &quot;localsql\nlocalldap&quot; (the

// double quotes are REQUIRED).  If &#039;value&#039; is empty (&#039;&#039;), all address

// books that the user has permissions to will be listed.

$_prefs[&#039;addressbooks&#039;] = array(

    &#039;value&#039; =&gt; &#039;&#039;,

    &#039;locked&#039; =&gt; false,

    &#039;shared&#039; =&gt; false,

    &#039;type&#039; =&gt; &#039;implicit&#039;,

);



// Default directory

$_prefs[&#039;default_dir&#039;] = array(

    &#039;value&#039; =&gt; &#039;&#039;,

    // &#039;value&#039; =&gt; &#039;localsql&#039;,

    &#039;locked&#039; =&gt; false,

    &#039;shared&#039; =&gt; false,

    &#039;type&#039; =&gt; &#039;select&#039;,

    &#039;desc&#039; =&gt; _(&quot;This will be the default address book when adding or importing contacts.&quot;),

);



my setup:



default_dir has been commented out as it has side effect (If I remember, localsql was not good when in shared mode..). In imp, there is a prefs to say where to add contacts and I added also a hook for seaerch sources (imp or kronolith) in horde/config/hooks.php:

function _prefs_hook_search_sources($username = null)



Anyway leaving default_dir blank, everything is working perfectly

</description> 
   <pubDate>Mon, 09 Mar 2009 07:57:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7877#t52961</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; So, my guess is that your &#039;localsql&#039; shares that are not </title> 
   <description>&gt;&gt; So, my guess is that your &#039;localsql&#039; shares that are not being

&gt;&gt; removed are not defined as &#039;default&#039; shares.

&gt;

&gt; What do you mean?



Sorry. What I mean is that there would only every be *one* address book (when using shares) that is removed from Turba&#039;s data store.  The address book that is removed is what (internally, anyway) we call the &quot;default&quot;, or &quot;personal&quot; address book - the one that would get created by default when the user first logs in if there are no other address books visible to the user at that time.  It&#039;s that last sentence that may cause confusion...say you have a &quot;global&quot; address book setup that all users can see.  A new user logging in will, in that case, *not* have a &quot;default&quot; address book created...therefore, will not have any address book removed automatically when the user&#039;s account is removed.



This was done as a precaution against inadvertently nuking data that other users may be using in a shared environment.</description> 
   <pubDate>Mon, 09 Mar 2009 13:52:37 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7877#t52968</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
