Ensure to only delete data of a valid contact
This commit is contained in:
parent
22cae5aaf2
commit
963374bb3e
|
@ -68,6 +68,7 @@ class ExpireAndRemoveUsers
|
||||||
Logger::warning('Error deleting user photos', ['errno' => DBA::errorNo(), 'errmsg' => DBA::errorMessage()]);
|
Logger::warning('Error deleting user photos', ['errno' => DBA::errorNo(), 'errmsg' => DBA::errorMessage()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($pcid)) {
|
||||||
$result = DBA::delete('post-tag', ['cid' => $pcid]);
|
$result = DBA::delete('post-tag', ['cid' => $pcid]);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
Logger::debug('Deleted post-tag entries', ['result' => $result, 'rows' => DBA::affectedRows()]);
|
Logger::debug('Deleted post-tag entries', ['result' => $result, 'rows' => DBA::affectedRows()]);
|
||||||
|
@ -92,6 +93,7 @@ class ExpireAndRemoveUsers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the contacts of this user
|
// Delete the contacts of this user
|
||||||
$self = DBA::selectFirst('contact', ['nurl'], ['self' => true, 'uid' => $user['uid']]);
|
$self = DBA::selectFirst('contact', ['nurl'], ['self' => true, 'uid' => $user['uid']]);
|
||||||
|
|
Loading…
Reference in a new issue