*
* @param string $user Name of user to remove data for.
*
- * @return mixed true on success | PEAR_Error on failure
+ * @throws Horde_Exception
*/
public function removeUserData($user)
{
if (!$GLOBALS['registry']->isAdmin() &&
- $user != $GLOBALS['registry']->getAuth()) {
- return PEAR::raiseError(_("You are not allowed to remove user data."));
+ ($user != $GLOBALS['registry']->getAuth())) {
+ throw new Horde_Exception(_("You are not allowed to remove user data."));
}
/* We need a clean copy of the $cfgSources array here.*/
}
if ($hasError) {
- return PEAR::raiseError(sprintf(_("There was an error removing an address book for %s"), $user));
+ throw new Horde_Exception(sprintf(_("There was an error removing an address book for %s"), $user));
}
-
- return true;
}
}