This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Using an existing username
#1

Hi all,

This is my first post since dl/installing Commentics and I must say the product works great.

For my application, I need to modify the the code slightly but I don't want to make changes to something I don't understand well.

I use $_SESSIONS variables to keep track of who is currently logged in to my site.

The username is stored in $_SESSION['user_name']; and I have all pages which can be commented on protected with a page protect script. Users can't comment or for that matter access the page unless they are logged in.

What I need to do is set the name of the user in the Connectics comment script to that of the current user (thats stored in $_SESSION['user_name'])

Any help or guidance would be much appreciated.


Thanks

Chris
Reply
#2

Hi,

In Commentics v1.5 you can open /comments/includes/functions/form.php, line 53:

Replace this:
PHP Code:
<?php 
if (!isset($default_name)) { $default_name = $settings->default_name; }

With this:
PHP Code:
<?php 
$default_name
= $_SESSION['user_name'];

Have you completed the interview?
Reply
#3

Thank you so much Steven.

It works like a charm Smile

I have another question, but i will open a new thread

Thanks
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 1 Guest(s)