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.

Files: 
CommentFileSizeAuthor
page.tpl_.php_.patch570 bytesfundawang

Comments

Hi fundawang,

Thank you!

Dan

Same for 6.x-2.1

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

    <?php
    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>'; } }
    ?>