MyBB Community Forums

Full Version: Error changing postbit_author_user
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We use a theme so I am trying to change it in the template for the theme. The issue is that when I open it up and put in the line and try to save it it gives me an error message.

 {$post['user_details'] = "{$post['user_details']} <br/>User ID: {$post['uid']}";}

When I save it, it gives me this message:

The following errors were encountered:
A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support.

Something wrong with the code that I'm not seeing?

Using Mybb 1.6.11

We'd like to be able to see user ID in post_bit for guests and registered members. (Was working in registered members first.) We find it easier to track guests, if they get the ID number assigned through their IP address. Also if a registered member posts when they are not logged in, we know its them.

Thanks!
If you only want to show the user ID, you only need this little piece of code.

<br/>User ID: {$post['uid']}
(2014-04-29, 01:06 AM)thexshadow Wrote: [ -> ]If you only want to show the user ID, you only need this little piece of code.

<br/>User ID: {$post['uid']}

Thank you!

It at least worked for registered members. But when I plug it in for guests it just says User ID: 0

Anyone know of a code for guests to be able to get them a user ID?
I don't think you can do that with guests. Since they are not registered, they do not have a UID.
Guests can't have UID in default MyBB but you can for example generate a number based on IP, see: http://community.mybb.com/thread-148100-...pid1048754 or the paid plugin below my post.