Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • funkmanusa Friend
    #135175

    is there a way to make the main menu in the left module turn off when a user is registered and logged in?

    Essentially so it will only show the left main menu module when its a public user.

    Thanks.

    Sherlock Friend
    #278691

    Hi funkmanusa !
    You only can set for a module display when user login , you can’t set for a module display when a user don’t logged in.
    But there are a way for do it :
    You can use format below for check user logged in or haven’t logged in .


    <?php
    global $my;
    if($my->id) {
    //logged in
    } else {
    //haven't logged in yet
    }

    funkmanusa Friend
    #278714

    Thanks for the reply hainn!

    Ok, Im pretty much very noobish here. So I would place this in the index.php?
    And specifically to the main menu in the left module on Edenite how would I make this work?
    My main menu is id- 1

    Thanks in advance!

    Sherlock Friend
    #278814

    Hi funkmanusa !
    yes, you place it in index.php file, with format below :


    <?php
    global $my;
    if($my->id) {
    //logged in
    } else {
    // code to load mainmenu module.
    }

    to use that code you need assign mainmenu to a new position.

    funkmanusa Friend
    #278906

    Hainn, thanks for your help, but Im not sure your understanding my question correctly.

    The main menu shows in the left module, right where it should be, but when someone logs in, I would like that specific module to go away-turn off. So it only shows in public view and not for registered users.

    I’ve tried a module called “metamod” for other modules and it does work for all of my other modules except the left main menu module, it causes an error. How else could I do that?

    Thanks again for your help!

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  funkmanusa 15 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum