Hello,
Yes we have seen and fixed this bug already.
(newer 1.1.4 should not have this issue).
We didn’t push out a new version yet as we where hoping to finish up on the contact page shortcode. (which should be soon).
If you go to:
includes/database.php
Look for:
/*Add user id of ticket instead of wordpress */
$selectuser_id = mysql_query("SELECT user_id FROM ".$keyost_prefix."user_email WHERE <code>address</code> = '".$e_address."'");
$get_user_id = mysql_fetch_row($selectuser_id);
$user_id=$get_user_id[0];
Replace it all with:
/*Add user id of ticket instead of wordpress start here */
$user_id = $ost_wpdb->get_var("SELECT user_id FROM ".$keyost_prefix."user_email WHERE <code>address</code> = '".$e_address."'");
/*Add user id of ticket instead of wordpress end here*/
Optionally you can also download the latest files from wordpress which should resolve it.
Regards,
Marco
Thread Starter
sldayo
(@sldayo)
Hello,
Thank you for your swift response!
I looked for the code you suggested, but I could not find it in the file you specified. Instead, I found the code you suggested I replace the old code with.
Thread Starter
sldayo
(@sldayo)
Perhaps the following could be the correct fix?
The code formatting is not working properly because of backticks in the code, and I’m not sure how to work around that.
Please see this gist instead.
————- Broken code below ————-
File: templates\new_ticket.php
Look for code:
$selectuser_id = mysql_query(“SELECT user_id FROM “.$keyost_prefix.”user_email WHEREaddress = ‘”.$current_user->user_email.”‘”);
$get_user_id = mysql_fetch_row($selectuser_id);
$user_id=$get_user_id[0];
Replace with:
$user_id = $ost_wpdb->get_var(“SELECT user_id FROM “.$keyost_prefix.”user_email WHEREaddress= ‘”.$current_user->user_email.”‘”);
ahh, looks like we forgot to push that fix in wordpress svn.
in templates/new_ticket.php
replace with:
/*Add user id of ticket instead of wordpress start here */
$user_id = $ost_wpdb->get_var("SELECT user_id FROM ".$keyost_prefix."user_email WHERE <code>address</code> = '".$current_user->user_email."'");
/*Add user id of ticket instead of wordpress end here*/