user_load_by_mail is not working
You cannot call user_load_by_mail function in hook_boot because this hook is called before the theme, modules, or most include files are loaded into memory. It happens while Drupal is still in bootstrap mode.

To get this function work you need to add this code before calling user_load_by_mail function:

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);