• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

not Logged User

dr_brown

Chevereto Member
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 ??
 
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
}
?>
 
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.
 
Back
Top