User preprocess not working I'm trying to pass a variable to an user template, here is my code:

function template-name_preprocess_user(&amp;$variables) {
  $variables['foo'] = 'foo';
}


It doesn't work. I tried adding these line in the core User module preprocess and it works!
Template hooks like template_preprocess_user() are implemented by custom module/theme by replacing template with [MODULE_NAME/THEME_NAME]. So, for example, if your theme short name is bartik, then the function name will be bartik_preprocess_user() which will be implemented in the bartik.theme file. 

function [MODULE/THEME_NAME]_preprocess_user(&amp;$variables) {
  $variables['foo'] = 'foo';
}