"${dbengine}""${db}" -N -B -q -e "select \`id\`, \`name\` from contact c where c.\`id\` not in (select \`contact-id\` from group_member) and (c.baseurl = \"${b}\" or c.url = \"${b}\")"| sudo tee -a "${idsdownfile}"#&> /dev/null
baseurltrimmed=$(echo"${baseurl}"| sed -e "s/http[s]*:\/\///g")
echo"Deleting user ${lineb} - ${nick}@${baseurltrimmed}"
"${dbengine}""${db}" -N -B -q -e "delete from \`post-thread\` where \`author-id\` = ${lineb} or \`causer-id\` = ${lineb} or \`owner-id\` = ${lineb}"
"${dbengine}""${db}" -N -B -q -e "delete from \`post-thread-user\` where \`author-id\` = ${lineb} or \`causer-id\` = ${lineb} or \`owner-id\` = ${lineb}"
"${dbengine}""${db}" -N -B -q -e "delete from \`post-user\` where \`author-id\` = ${lineb} or \`causer-id\` = ${lineb} or \`owner-id\` = ${lineb}"
"${dbengine}""${db}" -N -B -q -e "delete from \`post-tag\` where cid = ${lineb}"
"${dbengine}""${db}" -N -B -q -e "delete from \`post\` where \`owner-id\` = ${lineb} or \`author-id\` = ${lineb} or \`causer-id\` = ${lineb}"
"${dbengine}""${db}" -N -B -q -e "delete from \`photo\` where \`contact-id\` = ${lineb}"
"${dbengine}""${db}" -N -B -q -e "delete from \`contact\` where \`id\` = ${lineb}"