Commit 6366f772 authored by alexpott's avatar alexpott

Issue #2541340 by dawehner: Remove dead code from user module

parent 6feb57b3
......@@ -417,12 +417,6 @@ function user_format_name(AccountInterface $account) {
function user_template_preprocess_default_variables_alter(&$variables) {
$user = \Drupal::currentUser();
// If this function is called from the installer after Drupal has been
// installed then $user will not be set.
if (!is_object($user)) {
return;
}
$variables['user'] = clone $user;
// Remove password and session IDs, $form_state, since themes should not need nor see them.
unset($variables['user']->pass, $variables['user']->sid, $variables['user']->ssid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment