function betterlogin_preprocess_html in Better Login 8
Implements hook_preprocess_html().
File
- ./
betterlogin.module, line 108 - Make the login screens better :).
Code
function betterlogin_preprocess_html(&$variables) {
$current_path = \Drupal::service('path.current')
->getPath();
switch ($current_path) {
case '/user/login':
$variables['head_title']['title'] = t('Login');
break;
case '/user/password':
$variables['head_title']['title'] = t('Forgot your password?');
break;
case '/user/register':
$variables['head_title']['title'] = t('Register');
break;
case '/user/reset':
$variables['head_title']['title'] = t('Reset password');
break;
}
$variables['#cache']['contexts'][] = 'route';
$variables['page']['#cache']['contexts'][] = 'route';
}