Posted By

level09 on 09/07/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

picxelplay
variantstudios


Drupal SignIn/Welcome


 / Published in: PHP
 

  1. <ul id="access">
  2.  
  3. <li><?php
  4. global $user;
  5. if($user->uid>0){
  6. //logged in
  7. echo "<span>Welcome! $user->name </span>" .l("My Account",'user') .'</li>';
  8.  
  9. }
  10. else {
  11.  
  12. echo l('Sign up','user/register') .'</li>';
  13.  
  14. echo '<li>' .l('Login','user') .'</li>';
  15. }
  16.  
  17. ?>
  18.  
  19. </ul>

Report this snippet  

You need to login to post a comment.