Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //get the current $user object to determine the logged in user's id
- global $user;
- //now load the user id from the profile page into another object by pulling it from path
- $usertmp = user_load(array('uid' => arg(1)));
- if ($user->uid == $usertmp->uid) {
- //we're on the logged in user's page
- print "<h2>You haven't created any blog entries.</h2>";
- print "<h4>You can create a ";
- print l("new one.","add/blog");
- } else {
- print "<h2>".$usertmp->name." hasn't created any blog entries.</h2>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement