Jump to content
  • 0

If Not Logged In Not Displaying?


Question

Posted

Hi,

 

Not sure if it's me just having this problem. I edited download manager client_main.pdt to show message if client is not logged, then show you must login to download. It is showing if client is not logged in, however when user logged in, it shows the message as well.

 

Any advice on this?

<?php if (!$this->Html->ifSet($logged_in)) { ?>
<div class="col-md-12">
<p>You must logged in to download. Click <a href="<?php echo $this->Html->safe($this->client_uri . "login/");?>">here</a> to login</p>
</div>
<div class="clearfix"></div>
<?php } ?>

3 answers to this question

Recommended Posts

  • 0
Posted

The variable $logged_in doesn't exist in the view. It is not set, and by default Html::ifSet returns an empty string. This evaluates to boolean false. Your condition negates this value, so the condition is always boolean true. That is why your text is always shown.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...