You are here

function template_preprocess_lt_loggedinblock in LoginToboggan 8

Implements hook_preprocess_() for theme function defined at hook_theme above.

File

./logintoboggan.module, line 446
LoginToboggan module.

Code

function template_preprocess_lt_loggedinblock(&$variables) {
  $url = Url::fromRoute('user.logout');
  $logout_link = Link::fromTextAndUrl(t('Log out'), $url)
    ->toString();
  $variables['loggedinblock'] = \Drupal::theme()
    ->render('username', [
    'account' => $variables['account'],
  ]) . ' | ' . $logout_link;
}