[horde] horde-remove-user-data script usage

Michael M Slusarz slusarz at horde.org
Sun Nov 3 21:13:21 UTC 2013


Quoting "John H. Bennett III" <bennettj at thebennetthome.com>:

> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting "John H. Bennett III" <bennettj at thebennetthome.com>:
>>
>>> Quoting Michael M Slusarz <slusarz at horde.org>:
>>>
>>>> Quoting "John H. Bennett III" <bennettj at thebennetthome.com>:
>>>>
>>>>> Hello,
>>>>>
>>>>> How is one supposed to use this script?  I log in to my server  
>>>>> as root and run
>>>>>
>>>>> php /usr/bin/horde-remove-user-data
>>>>>
>>>>> I get the below, no matter if I try to put in a valid user or not.
>>>>>
>>>>> [root at www Horde_Smtp]# php /usr/bin/horde-remove-user-data
>>>>> [  INFO  ] Horde directory: /home/httpd/html/horde
>>>>>
>>>>> Username: john
>>>>>
>>>>> Application to remove data from (blank for all apps):
>>>>>
>>>>> Are you sure you want to remove user data?
>>>>> (y) Yes
>>>>> (n) No
>>>>>
>>>>> Type your choice [n]: y
>>>>>
>>>>> ====================
>>>>>
>>>>> Fatal Error:
>>>>> You are not allowed to remove user data.
>>>>>
>>>>> 1. Horde_Cli->fatal() /usr/bin/horde-remove-user-data:53
>>>>
>>>> You have at least one admin user defined in your config?
>>>>
>>>> michael
>>>>
>>>> ___________________________________
>>>> Michael Slusarz [slusarz at horde.org]
>>>>
>>>
>>> Yes, I sure do:
>>>
>>> $conf['auth']['admins'] = array('admin at mytest.com', );
>>
>> No idea.  Works here.  You'll need to track down the issue locally.
>>
>> michael
>>
>
> Well crud.  Since this is a test box, I reloaded, and I get the same  
> thing.  Would you or someone else help me to help myself in trying  
> to debug this, please?  My files are current as of today.

That script runs with the 'user_admin' flag set to true.  This means  
that the Horde Registry sets the user to the first user it finds in  
the admin config variable when initializing the script (see line ~325  
of the Horde_Registry library).  This should cause all further calls  
to Horde_Registry#isAdmin() to return true.  That obviously isn't  
happening in your case, so you need to debug why that method is  
returning false instead of true (~line 2140 of Horde_Registry).

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list