Sometimes, administrators will set the site as not available for public registration, so registration link on top head should be hidden in such cases.

Patch follows.

CommentFileSizeAuthor
page.tpl_.php_.patch570 bytesfundawang
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

danpros’s picture

Hi fundawang,

Thank you!

Dan

dunx’s picture

Same for 6.x-2.1

dunx’s picture

D6 change to page-front.tpl.php and page.tpl.php is the following in the obvious place.

    global $user; if ($user->uid != 0) { print '<li class="first">' .t('Logged in as '). '<a href="' .url('user/'.$user->uid). '">' .$user->name. '</a></li>'; print '<li><a href="' .url('logout'). '">' .t('Logout'). '</a></li>'; } else { print '<li class="first"><a href="' .url('user'). '">' .t('Login'). '</a></li>'; if ( variable_get('user_register',0) ) {print '<li><a href="' .url('user/register'). '">' .t('Register'). '</a></li>'; } }