Title: [Plugin: POST2PDF Converter] User variable not transmitted in plugin
Last modified: August 20, 2016

---

# [Plugin: POST2PDF Converter] User variable not transmitted in plugin

 *  [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/)
 * Hello,
 * I am using a plugin on a page that display different informations depending on
   the user name and role.
    I tried to add post2pdf on this page but it seems that
   when your plugins renders my plugin, it does not transmit the information about
   the user. It is certainly because the get_currentuserinfo() retrieve the name
   of the post2pdf instead of the name of the user who launched it.
 * Do you have any idea how to solve this plugin in plugin problem ?
 * Thanks
    Severin
 * [http://wordpress.org/extend/plugins/post2pdf-converter/](http://wordpress.org/extend/plugins/post2pdf-converter/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627266)
 * Hi, Sev san
 * That isn’t be a good way, but please try following way.
 * 1. Eidt `post2pdf-converter.php`.
 * Line 39
    `var $get_by_http_request = 0;`
 * =>
 * `var $get_by_http_request = 1;`
 * 2. Eidt `post2pdf-converter-pdf-maker.php`.
 * Line 16
    `var $get_by_http_request = 0;`
 * =>
 * `var $get_by_http_request = 1;`
 *  Thread Starter [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627282)
 * Thanks for quick reply, with this hack, it sends me back this error :
    Fatal 
   error: Cannot use object of type WP_Error as array in /home/www/6abc2510c0c8c00b5f0092a4f7df2a81/
   web/wordpress/wp-content/plugins/post2pdf-converter/post2pdf-converter-pdf-maker.
   php on line 127
 * Line 127 is this one :
    $content = preg_replace(“|^.*?<!– post2pdf-converter-
   begin –>(.*?)<!– post2pdf-converter-end –>.*?$|is”, “$1”, $response_data[‘body’]);
 *  Thread Starter [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627449)
 * Hello Redcocker, is it complex to solve ? Or are you simply busy with other stuffs?
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627450)
 * Hi, Sev san
 * Sorry for not replying sooner.
    Give me a little more time.
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627475)
 * Hi, Sev san
 * Please re-intall [Development Version](http://downloads.wordpress.org/plugin/post2pdf-converter.zip).
 * And make a change as follows.
 * 1. Eidt post2pdf-converter.php.
 * Line 39
    var $get_by_http_request = 0;
 * =>
 * var $get_by_http_request = 1;
 * 2. Eidt post2pdf-converter-pdf-maker.php.
 * Line 16
    var $get_by_http_request = 0;
 * =>
 * var $get_by_http_request = 1;
 *  Thread Starter [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627476)
 * First, thanks for your efforts.
    There is stil an error, I got “HTTP status code
   is not 200.”
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627477)
 * Hi, Sev san
 * If you can, let me know your site URL.
 * Contact:[http://www.near-mint.com/blog/contact](http://www.near-mint.com/blog/contact)
 *  Thread Starter [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627478)
 * Hello redcocker,
    Unfortunately I cannot give you access due to sensible information.
   What I can tell you is that I am using the plugin “participants-database”. Tell
   me if I could launch some tests to try to debug this.
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627480)
 * Hi, Sev san
 * Thank you for your reply.
 * Maybe, Participants Database doesn’t cause this issue.
 * Please check HTTP status code(200, 404 etc.) by following tool and let me know
   it.
 * [http://httpstatus.nl/](http://httpstatus.nl/)
 *  Thread Starter [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627482)
 * I got this message :
 * > Warning: mkdir() [function.mkdir]: Permission denied in /home/www/6abc2510c0c8c00b5f0092a4f7df2a81/
   > web/wordpress/wp-content/plugins/post2pdf-converter/post2pdf-converter-pdf-
   > maker.php on line 55
   >  HTTP status code is not 200.
 * So I manually created the folder “tcpdf-pdf” in “wp-content” with the good permissions(
   as on line 55) but I still have the “HTTP status code is not 200.”
    Entering 
   it in “[http://httpstatus.nl/&#8221](http://httpstatus.nl/&#8221); it only gives
   me status code = 500.
 * I guess there is something wrong with the rights to create the temporary PDF 
   on my folders…
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627483)
 * Hi, Sev san
 * Thank you for your reply.
 * When $get_by_http_request is set to “1”, this plugin will get your content by
   HTTP request(NOT by database access).
 * But Internal server error(status code 500) occurs in your site.
 * Did you restrict access to your site/page?
 *  Thread Starter [Sev](https://wordpress.org/support/users/severindauvergne/)
 * (@severindauvergne)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627484)
 * Yes, my full site in under “Member Only” plugin, meaning that you have to register
   before entering.
    But in previous version (or at least without the $get_by_http_request
   is set to “1”) it was possible to generate the PDF.
 * I am using the user name of the connected user in other plugins that I modified,
   so may be I should have to do the same with your plugin ? Could you just tell
   me where to look at ?
 *  Plugin Author [redcocker](https://wordpress.org/support/users/redcocker/)
 * (@redcocker)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627485)
 * Hi, Sev san
 * > Yes, my full site in under “Member Only” plugin, meaning that you have to register
   > before entering.
 * Now I remember.
    This plugin can’t get contents by HTTP request under access 
   restriction.
 * > But in previous version (or at least without the $get_by_http_request is set
   > to “1”) it was possible to generate the PDF.
 * When $get_by_http_request is set to “0”, it will be possible to generate the 
   PDF.
    But It can’t get different informations depending on the user and role.
   Because this plugin gets contents from DB.
 * I’m sorry, but it may be difficult to respond to your request.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘[Plugin: POST2PDF Converter] User variable not transmitted in plugin’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post2pdf-converter_cad3dd.svg)
 * [POST2PDF Converter](https://wordpress.org/plugins/post2pdf-converter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post2pdf-converter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post2pdf-converter/)
 * [Active Topics](https://wordpress.org/support/plugin/post2pdf-converter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post2pdf-converter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post2pdf-converter/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [redcocker](https://wordpress.org/support/users/redcocker/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-post2pdf-converter-user-variable-not-transmitted-in-plugin/#post-2627485)
 * Status: not resolved