php code for "if logged in" vs "if not logged in"
Permalink
I'd like a login box to appear if not logged in. Otherwise, that area should show a Search box.
Thanks, I believe this is what I wanted if this is the correct code to get it to work with Concrete5. I just wasn't sure what keyword C5 might use to signify logged in vs. logged out.
I have the searchbox and login box all coded up, so presumably I can just put the correct bits in the corresponding spaces where you have your //comments ...is that right?
I have the searchbox and login box all coded up, so presumably I can just put the correct bits in the corresponding spaces where you have your //comments ...is that right?
Yeah, that is exactly right. and this is the right "concrete5" way of doing it ; )
Actually My code was backward. I edit the comment, so it will display correctly!
thanks!
The other way is ($u->getUserID()!='')//this means they are logged in. I think the above way is better.
Or did you also want the code for login and search box?