template_preprocess_user(&$variables)
Prepares variables for user templates.
Default template: user.html.twig.
array $variables: An associative array containing:
function template_preprocess_user(&$variables) { $variables['user'] = $variables['elements']['#user']; // Helpful $content variable for templates. foreach (Element::children($variables['elements']) as $key) { $variables['content'][$key] = $variables['elements'][$key]; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!user!user.module/function/template_preprocess_user/8.1.x