Advertisement
Guest User

Untitled

a guest
Dec 30th, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2. //get the current $user object to determine the logged in user's id
  3. global $user;  
  4.  
  5. //now load the user id from the profile page into another object by pulling it from path
  6. $usertmp = user_load(array('uid' => arg(1)));
  7.  
  8. if ($user->uid == $usertmp->uid) {
  9.      //we're on the logged in user's page
  10.      print "<h2>You haven't created any blog entries.</h2>";
  11.      print "<h4>You can create a ";
  12.      print l("new one.","add/blog");
  13. } else {
  14.      print "<h2>".$usertmp->name." hasn't created any blog entries.</h2>";
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement