// hack add the email, does not work in registration, we need the real user object
// hack this will not work in joomla, not sure why we need it
if ( isset( $user ) && ! CRM_Utils_Array::value( 'email', $fields ) )
$fields['email'] is generally not set because you tend to use email-Primary. In Drupal, $user is set for even anonymous users. So, this sets $fields['email'] = '' for anonymous users, which is bad.
One suggested change: also check that $user->uid > 0. That will exclude anonymous users.