original_string: public static function get_all_message_preferences($processors, $providers, $user) {
          $preferences = helper::get_providers_preferences($providers, $user->id);
          $preferences->userdefaultemail = $user->email; // May be displayed by the email processor.
  
          // For every processors put its options on the form (need to get function from processor's lib.php).
          foreach ($processors as $processor) {
              $processor->object->load_data($preferences, $user->id);
          }
  
          // Load general messaging preferences.
          $preferences->blocknoncontacts = self::get_user_privacy_messaging_preference($user->id);
          $preferences->mailformat = $user->mailformat;
          $preferences->mailcharset = get_user_preferences('mailcharset', '', $user->id);
  
          return $preferences;
      }
code: public static function get_all_message_preferences($processors, $providers, $user) {
          $preferences = helper::get_providers_preferences($providers, $user->id);
          $preferences->userdefaultemail = $user->email; // May be displayed by the email processor.
  
          // For every processors put its options on the form (need to get function from processor's lib.php).
          foreach ($processors as $processor) {
              $processor->object->load_data($preferences, $user->id);
          }
  
          // Load general messaging preferences.
          $preferences->blocknoncontacts = self::get_user_privacy_messaging_preference($user->id);
          $preferences->mailformat = $user->mailformat;
          $preferences->mailcharset = get_user_preferences('mailcharset', '', $user->id);
  
          return $preferences;
      }
code_tokens: public static function get_all_message_preferences ( $ processors , $ providers , $ user ) { $ preferences = helper :: get_providers_preferences ( $ providers , $ user -> id ) ; $ preferences -> userdefaultemail = $ user -> email ; // May be displayed by the email processor. // For every processors put its options on the form (need to get function from processor's lib.php). foreach ( $ processors as $ processor ) { $ processor -> object -> load_data ( $ preferences , $ user -> id ) ; } // Load general messaging preferences. $ preferences -> blocknoncontacts = self :: get_user_privacy_messaging_preference ( $ user -> id ) ; $ preferences -> mailformat = $ user -> mailformat ; $ preferences -> mailcharset = get_user_preferences ( 'mailcharset' , '' , $ user -> id ) ; return $ preferences ; }
docstring: Returns message preferences.
  
  @param array $processors
  @param array $providers
  @param \stdClass $user
  @return \stdClass
  @since 3.2
docstring_tokens: Returns message preferences .