if (common_config('site', 'closed')) {
// TRANS: Client error displayed when trying to create a new user while creating new users is not allowed.
$this->clientError(_m('Registration not allowed.'));
- return;
}
$invite = null;
if (empty($code)) {
// TRANS: Client error displayed when trying to create a new user while creating new users is not allowed.
$this->clientError(_m('Registration not allowed.'));
- return;
}
$invite = Invitation::getKV($code);
if (empty($invite)) {
// TRANS: Client error displayed when trying to create a new user with an invalid invitation code.
$this->clientError(_m('Not a valid invitation code.'));
- return;
}
}
if (empty($user)) {
// TRANS: Server error displayed when creating a new user has failed.
$this->serverError(_m('Error registering user.'));
- return;
}
$result = $this->saveForeignLink($user->id,
if (!$result) {
// TRANS: Server error displayed when connecting a user to a Twitter user has failed.
$this->serverError(_m('Error connecting user to Twitter.'));
- return;
}
common_set_user($user);
Event::handle('EndRegistrationTry', array($this));
- common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
- 303);
+ common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)), 303);
}
function connectNewUser()
if (!$result) {
// TRANS: Server error displayed connecting a user to a Twitter user has failed.
$this->serverError(_m('Error connecting user to Twitter.'));
- return;
}
common_debug('TwitterBridge Plugin - ' .
if (empty($result)) {
// TRANS: Server error displayed connecting a user to a Twitter user has failed.
$this->serverError(_m('Error connecting user to Twitter.'));
- return;
}
common_debug('TwitterBridge Plugin - ' .