Customizing the "user account" title for register/login pages
description
Did you ever want to customize the "user account" title that appears at the top of the user/register, user/password, and user/login pages, to better describe the task the user is currently performing?
If you want to customise the full page layout, click through to the Customising the login, registration and request password full page layout handbook page.
In page.tpl.php, in place of:
<h1 class="title"><?php print $title ?></h1>
Insert:
<h1 class="title">
<?php if (arg(0) == 'user' && arg(1) == 'register') : ?>
Create an Account
<?php elseif (arg(0) == 'user' && arg(1) == 'password') : ?>
Retrieve lost password
<?php elseif (arg(0) == 'user' && arg(1) == 'login') : ?>
User Login
<?php elseif (arg(0) == 'user') : ?>
User Account
<?php else : ?>
<?php print $title ?>
<?php endif ; ?>
</h1>And replace the text with whatever you wish. I'm sure there's a better way to write this code ;) but this works.
You can also do a small modification to test for user login:
<h1 class="title">
<?php if (arg(0) == 'user' && arg(1) == 'register') : ?>
Create an Account
<?php elseif (arg(0) == 'user' && arg(1) == 'password') : ?>
Retrieve lost password
<?php elseif (arg(0) == 'user' && arg(1) == 'login') : ?>
User Login
<?php elseif (arg(0) == 'user' && $user->uid === 0) : ?>
User Login
<?php elseif (arg(0) == 'user') : ?>
User Account
<?php else : ?>
<?php print $title ?>
<?php endif ; ?>
</h1>If your profile pages are public, these titles will override the account name with the text "User login." To account for that, use this code:
<?php
if (arg(0) == 'user' && arg(1) == 'register'):
print t('Create an account');
if (arg(0) == 'user' && arg(1) == 'password') :
print t('Retrieve lost password');
elseif (arg(0) == 'user' && arg(1) == 'login') :
print t('User login');
elseif (arg(0) == 'user' && arg(1) == '') :
print t('User login');
else:
print $title;
endif;
?>Note that only two == are required here. Also note that each text is wrapped with the t() function to make it translatable with Drupal's localization module.

Easier way
An potentially easier way is to affect the page.tpl.php via template.php. This code is the same as example #3. Place it in your template.php inside a hook_preprocess_page function. You may need to change the variable name ($var['title'] in the example below) to match your theme's title variable used in page.tpl.php.
// Customize the user login/register/password page titlesif (arg(0) == 'user' && arg(1) == 'register') {
$vars['title'] = t('Create a new account');
} elseif (arg(0) == 'user' && arg(1) == 'password') {
$vars['title'] = t('Retrieve lost password');
} elseif (arg(0) == 'user' && arg(1) == 'login') {
$vars['title'] = t('User login');
} elseif (arg(0) == 'user' && arg(1) == '') {
$vars['title'] = t('User login');
}