Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. function garland_user_bar() {
  2.   global $user;                                                              
  3.   $output = '';
  4.  
  5.   if (!$user->uid) {                                                          
  6.     $output .=print ("Welcome Guest Please "); print l("Login","user");print (" or"); print l(" Register","user/register");                          
  7.   }                                                                          
  8.   else {                                                                      
  9.     $output .= t('<p class="user-info">Hi !user, welcome back.</p>', array('!user' => theme('username', $user)));
  10.  
  11.     $output .= theme('item_list', array(
  12.       l(t('Your account'), 'user/'.$user->uid, array('title' => t('Edit your account'))),
  13.       l(t('Sign out'), 'logout')));
  14.     $output = '<div id="user-bar">'.$output.'</div>';
  15.     return $output;
  16.   }  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement