parameters: (user=None)
docstring: Get user email notification preference.
  
      :param user: The user to query for.
      :type user: str or CRITsUser
      :returns: str
docstring_summary: Get user email notification preference.
docstring_tokens: Get user email notification preference .
function: def get_user_email_notification(user=None):
      """
      Get user email notification preference.
  
      :param user: The user to query for.
      :type user: str or CRITsUser
      :returns: str
      """
  
      if user is None:
          return None
  
      if not hasattr(user, 'username'):
          from crits.core.user import CRITsUser
          user = str(user)
          try:
              user = CRITsUser.objects(username=user).first()
              return user.get_preference('notify', 'email', False)
          except Exception:
              return None
      if user:
          return user.get_preference('notify', 'email', False)
      else:
          return None
function_tokens: def get_user_email_notification ( user = None ) : if user is None : return None if not hasattr ( user , 'username' ) : from crits . core . user import CRITsUser user = str ( user ) try : user = CRITsUser . objects ( username = user ) . first ( ) return user . get_preference ( 'notify' , 'email' , False ) except Exception : return None if user : return user . get_preference ( 'notify' , 'email' , False ) else : return None