Show "Logout" link only when a password is required

Re-introducing the test, removed when the menu was updated

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign
2022-08-29 14:48:07 -03:00
parent 5827d963b8
commit d3c59d42a7

View File

@@ -208,8 +208,10 @@ if ($auth) {
<a class="btn-link" href="https://discourse.pi-hole.net/" rel="noopener" target="_blank"><i class="fa fa-fw menu-icon fab fa-discourse"></i> Pi-hole Forum</a>
<a class="btn-link" href="https://github.com/pi-hole" rel="noopener" target="_blank"><i class="fa-fw menu-icon fab fa-github"></i> GitHub</a>
<a class="btn-link" href="https://discourse.pi-hole.net/c/announcements/5" rel="noopener" target="_blank"><i class="fa-fw menu-icon fa fa-regular fa-rocket"></i> Pi-hole Releases</a>
<?php if (strlen($pwhash) > 0) { // Show "Logout" link only when the user has the password protection enabled.?>
<hr>
<a class="btn-link" href="logout.php" rel="noopener"><i class="fa fa-fw menu-icon fa-sign-out-alt"></i> Log out</a>
<?php } ?>
</li>
</ul>
</li>