return;
}
+ $user = common_current_user();
+
+ if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ common_redirect(common_local_url('subscriptions', array('nickname' => $user->nickname)));
+ return;
+ }
+
$other_nickname = $this->arg('subscribeto');
$other = User::staticGet('nickname', $other_nickname);
return;
}
- $user = common_current_user();
-
if ($user->isSubscribed($other)) {
common_user_error(_t('Already subscribed!.'));
return;
common_user_error(_t('Not logged in.'));
return;
}
+
+ $user = common_current_user();
+
+ if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ common_redirect(common_local_url('subscriptions', array('nickname' => $user->nickname)));
+ return;
+ }
+
$other_nickname = $this->arg('unsubscribeto');
$other = User::staticGet('nickname', $other_nickname);
if (!$other) {
return;
}
- $user = common_current_user();
-
if (!$user->isSubscribed($other)) {
common_server_error(_t('Not subscribed!.'));
}