Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
page.tpl_.php_.patch | 570 bytes | fundawang | |
Comments
Comment #1
danpros CreditAttribution: danpros commentedHi fundawang,
Thank you!
Dan
Comment #2
dunx CreditAttribution: dunx commentedSame for 6.x-2.1
Comment #3
dunx CreditAttribution: dunx commentedD6 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>'; } }