- parent::handle($args);
- if ($this->boolean('ajax')) {
- StatusNet::setApi(true);
- }
- if (!common_logged_in()) {
- // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
- $this->clientError(_('Not logged in.'));
- }
-
- $user = common_current_user();
-
- if ($_SERVER['REQUEST_METHOD'] != 'POST') {
- common_redirect(common_local_url('subscriptions',
- array('nickname' => $user->nickname)));
- }
-
- /* Use a session token for CSRF protection. */
-
- $token = $this->trimmed('token');