user_mail_tokens is undefined I keep getting an error in a site I am trying to work on, which is base don another. The error is in a custom module, and the code line is

if (!function_exists('user_mail_tokens'))
{
    include_once(drupal_get_path('module', 'modulename').'/modulename_e.inc');
 }


As I said this is a copy of another site, which runs. grep shows that the file _e.inc doesn't exist in the other project, so I can only assume that the tokens are defined elsewhere. a Google search implies that the method is sttandard, so I don't want to create a new inf file that redefines it. So where should 'user_mail_tokens' be defined?
Matt -
The user_mail_tokens is a function provided by the user module (Drupal 7 core). Essentially, what your code is saying is:

If the function user_mail_tokens exists (which it should because it's a core function, however these conditional checks are awesome and important), then we are going to include an include file located at /sites/all/modules/modulename/modulename_e.inc.

As to why your code is throwing an error for user_mail_tokens that is an interesting question. I'm looking into it now. Part of me wonders if we should  just say module_exists

What is the need to check the user_mail_tokens?