[horde] PHP ERRORs when using removeUserData()
Steffen
skhorde at smail.inf.fh-bonn-rhein-sieg.de
Fri Oct 18 10:35:55 UTC 2013
Hi,
because I didn't found a ready-to-use script to remove user data for
Horde5, e.g. in /usr/bin, I assembled:
<?PHP
///// top of script from /usr/bin/webmail-install script
require_once HORDE_BASE . '/lib/core.php';
// Load the CLI environment.
$cli = Horde_Core_Cli::init();
if (!$cli->runningFromCLI()) {
$cli->fatal('This script must be run from the command line.');
}
// Start.
$cli->writeln();
$cli->writeln($cli->bold('Remove user data'));
Horde_Registry::appInit('horde', array('cli' => true, 'user_admin' =>
true));
$value = '<user>';
$cli->writeln('Remove user data of ' . $value);
$registry->removeUserData($value);
=============
Running this script, I get the following PHP ERRORs in syslog:
1x
Oct 18 11:19:15 h5 HORDE: [horde] PHP ERROR: Cannot modify header information - headers already sent by (output started at /usr/share/php/Horde/Cli.php:184) [pid 30954 on line 671 of "/usr/share/php/Horde/Core/Auth/Application.php"]
19x
Oct 18 11:19:XX h5 HORDE: [horde] PHP ERROR: Illegal offset type in isset or empty [pid 30954 on line 244 of "/usr/share/php/Horde/Prefs/Scope.php"]
66x
Oct 18 11:19:XX h5 HORDE: [horde] PHP ERROR: rewind() expects parameter 1 to be resource, array given [pid 30954 on line 295 of "/usr/share/php/Horde/Prefs/Scope.php"]
OK, the second and the third actually worry me, if I made a mistake
in the script.
The data of the user is actually deleted, except from the share tables,
which seems to be a left-over from the migration share -> share ng.
This installation is a fresh upgrade from Horde3, using SQL ng share tables,
and imp for authentification.
For testing, I just made an upgrade of the PEAR modules to the current
ones, eg:
Horde_Cli 2.0.4 stable
Horde_Core 2.10.0 stable
horde 5.1.4 stable
=====
Is my script correct?
Kind regards,
--
Steffen
More information about the horde
mailing list