From: Christian Weiske Date: Mon, 17 Sep 2012 21:48:04 +0000 (+0200) Subject: show openid of user in forbidden page X-Git-Tag: v0.3.0~42^2~27 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/d6d44a3855f93afebd962843cfdfb9952912443e show openid of user in forbidden page --- diff --git a/data/templates/forbidden.htm b/data/templates/forbidden.htm index 04b8fb6..585c2fe 100644 --- a/data/templates/forbidden.htm +++ b/data/templates/forbidden.htm @@ -5,11 +5,21 @@ acces denied

Access Denied

+{% if identity %}

- We're sorry; but you are not allowed to access this page. + You are logged in with the following OpenID:

- You may log in if you want. + {{identity}}

+

+ Unfortunately, your OpenID is not unlocked. + Contact the site administrator to get access. +

+{% else %} +

+ We're sorry; but you have to log in to access this page. +

+{% endif %} {% endblock %} diff --git a/www/forbidden.php b/www/forbidden.php index fc166eb..6c44099 100644 --- a/www/forbidden.php +++ b/www/forbidden.php @@ -5,7 +5,10 @@ namespace phorkie; */ render( - 'forbidden' + 'forbidden', + array( + 'identity' => isset($_SESSION['identity']) ? $_SESSION['identity'] : null + ) ); exit(); ?>