Page 1 of 1

Turn off navbar if user not signed in

Posted: 2017-08-03 16:47
by bdurfee
I want to turn off the navbar if the user is not signed in. What is the best way to do this?

Re: Turn off navbar if user not signed in

Posted: 2017-08-03 18:57
by bdurfee
I found a quick way to do this. Add this just before the <body> tag.

Code: Select all

<?php 
	$mi = getMemberInfo();
	if(!$mi['username'] || $mi['username'] == 'guest'){ ?>
		<style>
			.navbar-fixed-top {
				min-height: 0px;
				display: none;
			}
		</style>
<?php } ?>
Comments welcome.