summaryrefslogtreecommitdiff
path: root/lib/helpers.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2018-12-08 12:23:08 -0800
committerAaron Parecki <aaron@parecki.com>2018-12-08 12:23:08 -0800
commit89644bc435419017c56348c63403b07a0ba6fc6f (patch)
tree0f75df085dfe2022a1e7cf9f9b78a24598f6bd40 /lib/helpers.php
parenteca06e69ad238444b51d9f3fcfd7e6b3d1e76e3d (diff)
reset micropub config data
Diffstat (limited to 'lib/helpers.php')
-rw-r--r--lib/helpers.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/helpers.php b/lib/helpers.php
index d714c23..36e964b 100644
--- a/lib/helpers.php
+++ b/lib/helpers.php
@@ -284,6 +284,11 @@ function get_micropub_config(&$user, $query=[]) {
}
}
+ // Reset the values so they can be overwritten
+ $user->syndication_targets = '';
+ $user->supported_post_types = '';
+ $user->micropub_media_endpoint = '';
+
if(count($targets))
$user->syndication_targets = json_encode($targets);
@@ -300,9 +305,7 @@ function get_micropub_config(&$user, $query=[]) {
}
}
- if(count($targets) || $media_endpoint || $supported_post_types) {
- $user->save();
- }
+ $user->save();
return [
'targets' => $targets,