Recent Topics

1 Mar 02, 2008 00:53    

My b2evolution Version: 1.10.x

I'm adding a login form to each page of my blog, it wasn't that hard to copy the code from the standard login page and cut out all the unnecessary stuff. The problem, of course, is that it shows even when the person's logged in already. I'd like to change the code so that if the person is logged in that space is filled with a welcome message, possibly linking to their profile. How would I do this?

2 Mar 02, 2008 01:11

Why not just use the login() function, which provides a link if the visitor is not logged in? If it's in your _main.php file then on every page generated by the skin it'll show up. If you absolutely MUST have the fields available, then wrap it in something like this:

if( is_logged_in() ) {
// do something for logged in people
} else {
// do something for not-logged in people
}

3 Mar 02, 2008 01:55

Thanks, that's exactly what I need. Is there a way to put a link to the person's profile when they're logged in, or at least display their name?

4 Mar 08, 2008 00:08

Bump... still looking for the code to put in a link to the person's profile with their name.

5 Mar 08, 2008 00:13

A link to a logged in user's profile is standard stock stuff.

user_profile_link( 'before', 'after' );


Most of the time 'before' is '<li>' and after is '</li>' but that depends on your skin.

I don't know how to get a logged in user's name.


Form is loading...