Aaron Parecki
6 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
2 changed files with
8 additions and
3 deletions
-
controllers/auth.php
-
lib/helpers.php
|
|
@ -291,6 +291,8 @@ $app->post('/auth/reset', function() use($app) { |
|
|
|
$user->micropub_media_endpoint = ''; |
|
|
|
$user->micropub_scope = ''; |
|
|
|
$user->micropub_access_token = ''; |
|
|
|
$user->syndication_targets = ''; |
|
|
|
$user->supported_post_types = ''; |
|
|
|
$user->save(); |
|
|
|
|
|
|
|
unset($_SESSION['auth']); |
|
|
|
|
|
@ -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, |
|
|
|