On my website http://www.klifix.eu I like to add the username in my header.
I currently use this code:
[code]<?php global $userdata; get_currentuserinfo();
echo(‘Ingelogd als: ‘ . $userdata->user_login . “\n”);
This only shows the username when logged in. But when not logged it showes nothing. I’d like to add the function to show the name ‘guest’ when a user is not logged in.
Anybody knows how to do this?
- The topic ‘Login information’ is closed to new replies.