Trying to bring together Wordpress and JCow

If I could award 1000 points for this I would... I have one domain I am using at the primary software I am running is JCow (PHP + MySQL). I am trying to add WordPress as a single sign-on addition in another folder. I was thinking of just merging members by having a utility that exports JCOW member list to a csv onto the server, then have wordpress import it, but the user would still have to log into both systems..  I am looking to see if anyone is familiar enough with wordpress where I could, even using a plugin, set up single sign on using JCow...

A little background on JCOW code... The attached code will populate when a user is logged in using Jcow. Can this jcow database query be used to run wordpress?

Any ideas you have even if it does not solve the problem would be a great help!

Thank in advance!

Lost in code.. Mike

<? require_once './includes/'; 

Echo '<strong>'.$stats['members'].'</strong> '.t('Members strong!').'<br />';
ECHO 'Client ID is: '.$client['id'].'<br>';
ECHO 'Username is: '.$client['uname'].'<br>';
ECHO 'fullname is: '.$client['fullname'].'<br>';
ECHO 'birthmonth is: '.$client['birthmonth'].'<br>';
ECHO 'birthday is: '.$client['birthday'].'<br>';
ECHO 'avatar is: '.$client['avatar'].'<br>';
ECHO 'settings is: '.$client['settings'].'<br>';
ECHO 'profile_permission is: '.$client['profile_permission'].'<br>';
ECHO 'email is: '.$client['email'].'<br>';
ECHO 'Password is: '.$client['password'].'<br>';
ECHO 'Last Login is: '.$client['lastlogin'].'<br>';
ECHO 'level is: '.$client['level'].'<br>';
ECHO 'location is: '.$client['location'].'<br>';
ECHO 'ipaddress is: '.$client['ipaddress'].'<br>';
ECHO 'gender is: '.$client['gender'].'<br><br>';


Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian MatzTechnical SupportCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian MatzTechnical SupportCommented:
Or another thing you could do is this:

Make a page template for your wordpress theme. To do this, you can create a blank PHP script and enter a Template Name tag like this...

 * Template Name: User Registration

// ..........


Open in new window

You then make a new page via the Wordpress dashboard and assign the template to it. For now, this page will be blank.

Then you could add the wp_insert_user(); function along with some security check to make sure only your JCow scripts can access it. You'll also need to catch some POST variables, but I'll get to that in a moment.

You'd also need to modify your user registration script. Add a small cURL snippet that will connect to your Wordpress page. cURL will basically pass the new user details over to Wordpress using the POST method.

Along with the user details, you can create and add an access hash or something to the POST data.

You can then accept the POST data via your Wordpress page and process it via the wp_insert_user() function. The access hash can be verified like, for example:

 * Template Name: User Registration

$accessKey = '12345H';
$remoteKey = isset($_POST['key']) ? $_POST['key'] : NULL;

if ( $accessKey !== $remoteKey ) :
     die('Permission denied!');

// ..........


Open in new window

I hope this makes at least some sense. Please bear in mind, I'm not familiar with JCow.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.