if (empty($this->accessToken)) {
$this->clientError(_m("Unable to authenticate you with Facebook."));
- return false;
}
$graphUrl = 'https://graph.facebook.com/me?access_token=' . urlencode($this->accessToken);
// TRANS: in the same StatusNet site.
_m('There is already a local account linked with that Facebook account.')
);
-
- return;
}
$cur = common_current_user();
// TRANS: in the same StatusNet site.
_m('There is already a local account linked with that Facebook account.')
);
-
- return;
}
}
if (common_config('site', 'closed')) {
// TRANS: Client error trying to register with registrations not allowed.
$this->clientError(_m('Registration not allowed.'));
- return;
}
$invite = null;
if (empty($code)) {
// TRANS: Client error trying to register with registrations 'invite only'.
$this->clientError(_m('Registration not allowed.'));
- return;
}
$invite = Invitation::getKV($code);
if (empty($invite)) {
// TRANS: Client error trying to register with an invalid invitation code.
$this->clientError(_m('Not a valid invitation code.'));
- return;
}
}
if (!$result) {
// TRANS: Server error displayed when connecting to Facebook fails.
$this->serverError(_m('Error connecting user to Facebook.'));
- return;
}
// Add a Foreign_user record
if (empty($result)) {
// TRANS: Server error displayed when connecting to Facebook fails.
$this->serverError(_m('Error connecting user to Facebook.'));
- return;
}
}