Hide login link after sucessfull login vice versa

Discussion in 'PHP' started by KRISHNA KUMAR, Sep 2, 2009.

  1. #1
    Hi,
    please guide me how to hide login link after successful login in joomla1.5.
    i want when user is not log in then link should be display as login but after successful login, login link hide logout link display.
     
    KRISHNA KUMAR, Sep 2, 2009 IP
  2. shaunole

    shaunole Peon

    Messages:
    24
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You may be better off posting this to a Joomla forum based on your level of PHP experience. If you feel comfortable editing Joomla code, you can integrate an if statement as follows:

    
    <?php
      if(## your login verification function ##) {
        // if within this block, the user is logged in, display logout link.
        echo("<a href='logout.php'>Logout</a>");
      } else {
        // if within this block, the user is not logged in. display login link
        echo("<a href='login.php'>Login</a>");
      }
    ?>
    
    Code (markup):
    Hopefully this helps.
     
    shaunole, Sep 3, 2009 IP