User module functions undefined in custom module
So you are just calling a function without telling drupal how to access that function , you can tell drupal about where to find this function using this code :

 module_load_include('module', 'user', 'user.module');