1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-26 05:32:59 +00:00

Squashed login status thingy

This commit is contained in:
Starbeamrainbowlabs 2016-06-05 12:26:16 +01:00
parent 9031fc4f2e
commit 0abc88e98e
2 changed files with 4 additions and 6 deletions

View file

@ -1296,12 +1296,11 @@ class page_renderer
case "user-status": case "user-status":
if($env->is_logged_in) if($env->is_logged_in)
{ {
$result .= "<span class='inflexible'>Logged in as " . self::render_username($env->user) . ".</span> "/* . page_renderer::$nav_divider*/; $result .= "<span class='inflexible'>" . self::render_username($env->user) . " <small>(<a href='index.php?action=logout'>Logout</a>)</small></span>";
$result .= "<span><a href='index.php?action=logout'>Logout</a></span>";
$result .= page_renderer::$nav_divider; $result .= page_renderer::$nav_divider;
} }
else else
$result .= "<span class='inflexible'>Browsing as Anonymous.</span>" . /*page_renderer::$nav_divider . */"<span><a href='index.php?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>Login</a></span>" . page_renderer::$nav_divider; $result .= "<span><a href='index.php?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>Login</a></span>";
break; break;
case "search": // Displays a search bar case "search": // Displays a search bar

View file

@ -869,12 +869,11 @@ class page_renderer
case "user-status": case "user-status":
if($env->is_logged_in) if($env->is_logged_in)
{ {
$result .= "<span class='inflexible'>Logged in as " . self::render_username($env->user) . ".</span> "/* . page_renderer::$nav_divider*/; $result .= "<span class='inflexible'>" . self::render_username($env->user) . " <small>(<a href='index.php?action=logout'>Logout</a>)</small></span>";
$result .= "<span><a href='index.php?action=logout'>Logout</a></span>";
$result .= page_renderer::$nav_divider; $result .= page_renderer::$nav_divider;
} }
else else
$result .= "<span class='inflexible'>Browsing as Anonymous.</span>" . /*page_renderer::$nav_divider . */"<span><a href='index.php?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>Login</a></span>" . page_renderer::$nav_divider; $result .= "<span><a href='index.php?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>Login</a></span>";
break; break;
case "search": // Displays a search bar case "search": // Displays a search bar