fix sql error when deleting a user without distribution lists

This commit is contained in:
Ralf Becker 2013-09-03 16:05:54 +00:00
parent f07e86026a
commit 826e7634bb

View File

@ -783,9 +783,9 @@ class addressbook_so
{
$this->somain->delete(array('owner' => $account_id)); // so_sql_cf::delete() takes care of cfs too
if(method_exists($this->somain, 'get_lists'))
if (method_exists($this->somain, 'get_lists') &&
($lists = $this->somain->get_lists($account_id)))
{
$lists = $this->somain->get_lists($account_id);
$this->somain->delete_list(array_keys($lists));
}
}