Commit 5fe59322 authored by Brion Vibber's avatar Brion Vibber

Check for Twitter foreign link actually existing before trying to delete it;...

Check for Twitter foreign link actually existing before trying to delete it; friendlier error message in TwittersettingsAction
parent 7adc6027
......@@ -247,6 +247,11 @@ class TwittersettingsAction extends ConnectSettingsAction
$user = common_current_user();
$flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
if (empty($flink)) {
$this->clientError(_m('No Twitter connection to remove.'));
return;
}
$result = $flink->safeDelete();
if (empty($result)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment