Browse Source

fix error message for missing "me" param

pull/30/head
Aaron Parecki 9 years ago
parent
commit
23ee5d71dc
  1. 6
      controllers/auth.php

6
controllers/auth.php

@ -157,10 +157,14 @@ $app->get('/auth/callback', function() use($app) {
// Double check there is a "me" parameter // Double check there is a "me" parameter
// Should only fail for really hacked up requests // Should only fail for really hacked up requests
if(!array_key_exists('me', $params) || !($me = normalizeMeURL($params['me']))) { if(!array_key_exists('me', $params) || !($me = normalizeMeURL($params['me']))) {
if(array_key_exists('me', $params))
$error = 'The ID you entered, <strong>' . $params['me'] . '</strong> is not valid.';
else
$error = 'There was no "me" parameter in the callback.';
$html = render('auth_error', array( $html = render('auth_error', array(
'title' => 'Auth Callback', 'title' => 'Auth Callback',
'error' => 'Invalid "me" Parameter', 'error' => 'Invalid "me" Parameter',
'errorDescription' => 'The ID you entered, <strong>' . $params['me'] . '</strong> is not valid.'
'errorDescription' => $error
)); ));
$app->response()->body($html); $app->response()->body($html);
return; return;

Loading…
Cancel
Save