sign in/my account

Discussion in 'aMember Pro v.4' started by ges33, Feb 19, 2012.

  1. ges33

    ges33 Member

    Joined:
    Jan 20, 2012
    Messages:
    41
    What code do I put into a php page to get the same effect as on the amember.com website, in the upper right corner. When a user isn't logged in it says: 'Already a member? Sign in' If the user is signed in, user sees 'My Account | Sign Out'.

    Thanks!
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Here is example:
    PHP:
    include "amember/library/Am/Lite.php"

    $lite Am_Lite::getInstance();

    if(
    $lite->isLoggedIn()){
       print 
    "Welcome ".$lite->getName();
    }else{
       print 
    $lite->renderLoginForm();
    }
  3. ges33

    ges33 Member

    Joined:
    Jan 20, 2012
    Messages:
    41
    Thanks, Alexander. But that's not the code I was looking for.

    I want the code that is used on the top right of this forum page that right now reads, "My Account | Sign Out". When I'm not logged in, it reads, "Already a member? Sign in".

    Thanks!
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Do you need it for xenforo? Or for any php page?
  5. ges33

    ges33 Member

    Joined:
    Jan 20, 2012
    Messages:
    41
    Any php page.
  6. ges33

    ges33 Member

    Joined:
    Jan 20, 2012
    Messages:
    41
    Still hoping to get a response on this. I want the code (for a PHP page) that will change
    "Already a member? Sign in" to ​
    "My Account | Sign Out" when a user logs in.​

    I also want to use this on Wordpress and vBulletin. Would there be different code for each of those or not? If so, can you provide that code for Wordpress and vBulletin as well.​

    Thanks!​

    sign in sign out.jpg

Share This Page