No user menu when not logged in
This commit is contained in:
parent
e7f11aee54
commit
c12f38f133
|
@ -44,14 +44,14 @@ function loginBar($sp = 'default-sp') {
|
||||||
if($attr) {
|
if($attr) {
|
||||||
$uname = $attr['uid'][0];
|
$uname = $attr['uid'][0];
|
||||||
$result .= "\t<a id=\"login\" href=\"#usermenu\" aria-hidden=\"true\">${svgWhite}" . htmlspecialchars($uname) . "</a>\n";
|
$result .= "\t<a id=\"login\" href=\"#usermenu\" aria-hidden=\"true\">${svgWhite}" . htmlspecialchars($uname) . "</a>\n";
|
||||||
} else {
|
|
||||||
$result .= "\t<a id=\"login\" href=\"" . htmlspecialchars($as->getLoginURL()) . "\">${svgWhite}Logg inn</a>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$result .= "\n\t<ul id=\"usermenu\">\n";
|
$result .= "\n\t<ul id=\"usermenu\">\n";
|
||||||
$result .= "\n\t\t<li><a id=\"login\" href=\"#\">${svgBlue}" . htmlspecialchars($uname) . "</a></li>\n";
|
$result .= "\n\t\t<li><a id=\"login\" href=\"#\">${svgBlue}" . htmlspecialchars($uname) . "</a></li>\n";
|
||||||
$result .= "\n\t\t<li><a href=\"" . htmlspecialchars($as->getLogoutURL()) . "\">Logg ut</a></li>\n";
|
$result .= "\n\t\t<li><a href=\"" . htmlspecialchars($as->getLogoutURL()) . "\">Logg ut</a></li>\n";
|
||||||
$result .= "\n\t</ul>\n";
|
$result .= "\n\t</ul>\n";
|
||||||
|
} else {
|
||||||
|
$result .= "\t<a id=\"login\" href=\"" . htmlspecialchars($as->getLoginURL()) . "\">${svgWhite}Logg inn</a>\n";
|
||||||
|
}
|
||||||
|
|
||||||
$result .= "\n\t<a href=\"#menu\" id=\"menu_toggle\" aria-hidden=\"true\"><big>☰ </big>MENU</a>\n";
|
$result .= "\n\t<a href=\"#menu\" id=\"menu_toggle\" aria-hidden=\"true\"><big>☰ </big>MENU</a>\n";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue