X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FPost%2FUser.php;h=0da3062a0ba33d07e437728636f0b96acd8d7119;hb=6dbbd081795fa1c8fe57db2248ac162efeeada88;hp=69225f042347a711cd6b9be4542354d09c2a4b90;hpb=eaa58da25b0cc51791c5a4db4fbe013faeca91d1;p=friendica.git diff --git a/src/Model/Post/User.php b/src/Model/Post/User.php index 69225f0423..0da3062a0b 100644 --- a/src/Model/Post/User.php +++ b/src/Model/Post/User.php @@ -1,6 +1,6 @@ $uri_id, 'uid' => $uid, 'fields' => $fields]); - return DBA::update('post-user', $fields, ['uri-id' => $uri_id, 'uid' => $uid], true); + return DBA::update('post-user', $fields, ['uri-id' => $uri_id, 'uid' => $uid], $insert_if_missing ? true : []); + } + + /** + * Delete a row from the post-user table + * + * @param array $conditions Field condition(s) + * @param array $options + * - cascade: If true we delete records in other tables that depend on the one we're deleting through + * relations (default: true) + * + * @return boolean was the delete successful? + * @throws \Exception + */ + public static function delete(array $conditions, array $options = []) + { + return DBA::delete('post-user', $conditions, $options); } }