summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2015-08-08 10:29:59 -0700
committerAaron Parecki <aaron@parecki.com>2015-08-08 10:29:59 -0700
commit23ee5d71dc96dae34a55d5816a356f5805950655 (patch)
treef38bca3a018614c32039c9cc3664eac8328ada6f /controllers
parent0ab0e2109bfea8eed47303aff8028ef1d8e9576b (diff)
fix error message for missing "me" param
Diffstat (limited to 'controllers')
-rw-r--r--controllers/auth.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/controllers/auth.php b/controllers/auth.php
index 4ec0db7..55bbf0c 100644
--- a/controllers/auth.php
+++ b/controllers/auth.php
@@ -157,10 +157,14 @@ $app->get('/auth/callback', function() use($app) {
// Double check there is a "me" parameter
// Should only fail for really hacked up requests
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(
'title' => 'Auth Callback',
'error' => 'Invalid "me" Parameter',
- 'errorDescription' => 'The ID you entered, <strong>' . $params['me'] . '</strong> is not valid.'
+ 'errorDescription' => $error
));
$app->response()->body($html);
return;