Skip to content

Instantly share code, notes, and snippets.

@AllieRays
Created August 3, 2014 22:27
Show Gist options
  • Save AllieRays/bdf9f09ba76a6ec2cacf to your computer and use it in GitHub Desktop.
Save AllieRays/bdf9f09ba76a6ec2cacf to your computer and use it in GitHub Desktop.
Altering text on Drupal login pages
function vod_preprocess_page(&$variables) {
// dpm($variables);
if ($variables['is_front'] == TRUE || arg(0) == 'home') {
$variables['title'] = '';
}
if ($variables['logged_in'] == FALSE && arg(0) == 'user') {
$variables['title'] = 'Sign In';
$variables['login_link'] = '<a href="/user/password" class="return-text">Forgot password?</a>';
}
if ($variables['logged_in'] == FALSE && arg(1) == 'password') {
$variables['title'] = 'Request Password';
$variables['login_link'] = '<a href="/user" class="return-text">Cancel</a>';
}
if ($variables['logged_in'] == FALSE && arg(1) == 'register') {
$variables['title'] = 'Create an Account';
$variables['login_link'] = '<a href="/user" class="return-text">Cancel</a>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment