Issue #2541340 by dawehner: Remove dead code from user module
parent
6feb57b3ac
commit
6366f77221
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue