Fix case where user's has_mail could be erroneously set to false