Hello,
im serarching for a simple way to check if the user ist fully logged in or not. Is there a function for it?
Hello,
im serarching for a simple way to check if the user ist fully logged in or not. Is there a function for it?
All problems solved.
I made a simple function.
Just use it wherever you like.
function userlogged(){
global $user_ID;
get_currentuserinfo();
if ( $user_ID=='' ){
return false; //user not logged in
} else {
return true; //user logged in
}
}
Use this function like:
if (userlogged()){
//logged true, proceed
} else{
//logged false, do what ever, maybe nothing?
}
it's not working with me
did you find this?
http://wordpress.org/support/topic/46315
if (!$user_ID) {
// this will show when someone is not logged in
}
or you can use:
if ($user_ID) {
// this will show when someone is logged in
}
This topic has been closed to new replies.