Created
August 11, 2012 20:50
-
-
Save clintonhalpin/3327229 to your computer and use it in GitHub Desktop.
Determine if users logged in, Serve different content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Determine User Status and Change Content based on login | |
*/ | |
get_currentuserinfo(); | |
global $user_ID, $user_login; | |
//Not Logged In go where ever | |
if ($user_ID == '') { | |
header('Location: /'); exit(); | |
} | |
//Admin = See All | |
elseif($user_ID == '1'){ | |
$user_content = ''; | |
} | |
//Logged In User | |
else { | |
$user_content = $user_login; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment