• Purchasing a license grants permission to use the software and to get Tech Support. A license purchase doesn't grant customization support.

not Logged User

dr_brown

Core license
License owner
I need to set conditions to show a div block for unregistered users. And for the registered do not show anything. But I have not found the construction of

CHV \ Login :: is not LoggedUser ()

What function describes unregistered users?

PHP:
                    <?php
                    if (CHV\Login::isLoggedUser()) {
                        ?>
                    <div class="margin-10">do not show anything</div>
                    <?php
                        }else{
                    ?>
                    <div class="margin-10">show what you need</div>
                    <?php
                        }
                    ?>
How to do without else ??
 

DeCysos

Phoenix Foto Service
License owner
Deutsch
Diese Funktion gibt es meiner Meinung nicht.
Aus diesem Grund empfehle ich Dir den code zu drehen....
PHP:
<?php
if (CHV\Login::isLoggedUser()) {
?>
    <div class="margin-10">show what you need</div>
<?php
}else{
?>
    <div class="margin-10">do not show anything</div>
<?php
}
?>
oder wenn Du es wirklich auf diese Art brauchst.... ( mit ! )
PHP:
<?php
if (!CHV\Login::isLoggedUser()) {
?>
    <div class="margin-10">do not show anything</div>
<?php
}else{
?>
    <div class="margin-10">show what you need</div>
<?php
}
?>
------------------------------
Translate in english
------------------------------
This feature does not exist in my opinion.
For this reason, I recommend you to turn the code ....

PHP:
<?php
if (CHV\Login::isLoggedUser()) {
?>
    <div class="margin-10">show what you need</div>
<?php
}else{
?>
    <div class="margin-10">do not show anything</div>
<?php
}
?>
or if you really need it this way .... ( with ! )
PHP:
<?php
if (!CHV\Login::isLoggedUser()) {
?>
    <div class="margin-10">do not show anything</div>
<?php
}else{
?>
    <div class="margin-10">show what you need</div>
<?php
}
?>
 

Rodolfo

Chevereto Developer
Chevereto Staff
PHP:
CHV\Login::isLoggedUser()
Returns true if a logged user exists, false if otherwise. You have to compare (true or false) depending on the case.
 
Top