Support » Plugin: DJD Site Post » PATCH: Guest posts do not have post_author

  • I had the issue where post_author is not being set, when guests trying to add a post from front page.

    Below is the patch I applied in my version:

    
    diff --git a/djd-site-post.php b/djd-site-post.php
    index 0019590..55427a7 100644
    --- a/djd-site-post.php
    +++ b/djd-site-post.php
    @@ -540,7 +540,7 @@ if (!class_exists("DjdSitePost")) {
     				if ( !empty ($_POST["djd-our-author"])) {
     					$my_post['post_author'] =  $_POST["djd-our-author"];
     				} else {
    -					$my_post['post_author'] = $user_verified['djd_user_id'];
    +					$my_post['post_author'] = $djd_options['djd-guest-account'];
     				}
     	
     				if( array_key_exists('djd_site_post_tags', $_POST)) {
    
  • The topic ‘PATCH: Guest posts do not have post_author’ is closed to new replies.