Page 1 of 1

Register/Login

PostPosted: August 4th, 2011, 2:05 pm
by wesleysoccer
What is the best way to add some php to my header so it say's "Register/Login" and after login has taken place it will now only show a "Welcome, Name" in replace of the "Register/Login" text?

I know how to add the Welcome, Name to appear after a login but was wondering if there is a way to add the register/login then it will add Welcome note...

Thanks

This is what I'm using to show up in header after someone logs in

<?php if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN){ ?><a href="http://" title="My Homepage">Welcome, <?php echo S2MEMBER_CURRENT_USER_FIRST_NAME; ?></a> | <a href="<?php echo S2MEMBER_LOGOUT_PAGE_URL; ?>"title="Sign Out"> Sign Out</a><?php } ?>

Re: Register/Login

PostPosted: August 5th, 2011, 12:48 am
by Cristián Lávaque
Something like this?

Code: Select all
<?php if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN){ ?>
    <a href="http://" title="My Homepage">Welcome, <?php echo S2MEMBER_CURRENT_USER_FIRST_NAME; ?></a> | <a href="<?php echo S2MEMBER_LOGOUT_PAGE_URL; ?>">Logout</a>
<?php } else { ?>
    <a href="<?php echo S2MEMBER_LOGIN_PAGE_URL; ?>">Login</a> | <a href="<?php echo S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL; ?>">Signup</a>
<?php } ?>

Re: Register/Login

PostPosted: August 5th, 2011, 10:50 pm
by wesleysoccer
Thanks...The only issue is I want the Register Now button to disappear and replace with Welcome, | Sign-out...Is this possible...

Re: Register/Login

PostPosted: August 6th, 2011, 12:32 am
by Cristián Lávaque
Yes, that's what I replied above. If logged in, show welcome|logout, otherwise, login|signup.

Re: Register/Login

PostPosted: August 6th, 2011, 7:22 am
by wesleysoccer
ok..I will try again.