Webmastersite.net
Register Log In

Integration problem - $cookieidtype

Comments on Integration problem - $cookieidtype

tradenet
Forum Regular

Usergroup: Customer
Joined: Oct 14, 2004

Total Topics: 54
Total Comments: 127
Posted Mar 09, 2007 - 7:30 PM:

I am trying to do an integration with wordpress mu.
Should be straight forward, however the $idcookiename is member username instead of an id. So, if I use:

$cookieidtype = 'name'

It makes no difference, the cookie still shows the id number and not the username.

Also the wp cookie contains "Domain:" rather than "Host:"
Domain: = ".domain.tld"
How can I create the cookie this way?



Please advise.

Thanks

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Mar 11, 2007 - 5:46 AM:

Are you saying that you can login to wordpress and be logged in to WSN Links, but when you login to WSN Links it sets the wrong login?

Also the wp cookie contains "Domain:" rather than "Host:"
Domain: = ".domain.tld"


I've no idea what you mean by this, since I've never heard of a cookie that contained either "Domain:" or Host:". Can you post the cookie?
tradenet
Forum Regular

Usergroup: Customer
Joined: Oct 14, 2004

Total Topics: 54
Total Comments: 127
Posted Mar 11, 2007 - 8:41 AM:

Ok, there are two cookies created by wordpress:
1.) wordpresspass
2.) wordpressuser

1.) wordpresspass
contains for example:

Name: wordpresspass
Content: 819acd991ss333q22aa4124aa444
Domain: .mydomain.com
Path: /
Send for: Any type of connection
Expires: at end of session


2.) wordpressuser

Name: wordpressuser
Content: admin
Domain: .mydomain.com
Path: /
Send for: Any type of connection
Expires: at end of session


WSN Links creates these cookies:

1.) wsnuser

Name: wsnuser
Content: 1
Host: mydomain.com
Path: /
Send for: Any type of connection
Expires: Tuesday, May 11, 2010 12:04:55 AM


2.) wsnpass, seems to be same in "Content:" except the cookie created contains "Host: mydomain.com" rather than "Domain: .mydomain.com".

So, what I am saying is if I understand the manual and use
$cookieidtype = 'name'

Using the example above, where username is admin = user_id = 1 and logging into WSN Links first;

"Content:1" should be replaced and set the cookie with "Content: admin"


This does NOT happen;

When I use the integration file:

<?php
$memberstable = 'wp_users'

$newusergroup = 'user_status'
$newname = 'user_login'
$newid = 'ID'
$newpassword = 'user_pass'
$newemail = ''
$newtime = ''
$newip = ''
$newvalidated = ''
$newsignature = ''
$newlocation = ''
$newbio = ''
$newhomepage = 'user_url'
$newoccupation = ''
$newaim = ''
$newmsn = ''
$newicq = ''
$newyahoo = ''
$newcustomtitle = ''
$newinterests = ''
$newsalt = ''

$otherencoder = 'no'

$admingroup = '-1'
$group4 = ''
$group5 = ''

$idcookiename = 'wordpressuser'
$passwordcookiename = 'wordpresspass'
$cookietype = ''
$idindex = ''
$passwordindex = ''
$cookieidtype = 'name'
$sessionquery = ''

?>

WSN links is producing the two cookies fine, however "wordpressuser" is created with the ID number rather than the username.
Consequently, I am unable to log into either wordpress or links, that is if I attempt to log into links first.

If I leave cookieidtype empty I can log into links but not into wordpress, it gives me an incorrect session ID error.
If I look at the cookie WSN links produces "Content: 1" is always present no matter if I use
$cookieidtype = 'name' or $cookieidtype = ''

Again that's if I attempt to log into links first before wordpress.

I am however assuming setting $cookieidtype="name" is supposed to set the cookie with a username rather than ID number.

BTW, I am using Firefox to view the cookie information.














tradenet
Forum Regular

Usergroup: Customer
Joined: Oct 14, 2004

Total Topics: 54
Total Comments: 127
Posted Mar 11, 2007 - 3:59 PM:

Would this help you:
codex.wordpress.org/Giving_...ordPress_Its_Own_Directory

However, I am using Wordpress MU (multi-User).
http://mu.wordpress.org/

It doesn't produce a hash cookie like the stand alone version does.
But the layout is the same.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Mar 12, 2007 - 6:27 AM:

I've installed wordpress and see that wordpress makes cookies absurdly difficult to handle. The cookies rename themselves with random strings for no apparant reason. The password cookie is double md5ed so it doesn't match the database value.

Moreover, Word Press doesn't seem to have any place to actually set the cookies to be global to the domain... I had to manually hack the source to it to set a cookie that would be accessible outside the Word Press directory. Since hardly anyone will be able to figure out how to make their cookies accessible I'm not going to waste the time handling them (unless of course it's at an hourly rate).

I can get the wordpress registration date working properly, have done that for 4.0.20.
tradenet
Forum Regular

Usergroup: Customer
Joined: Oct 14, 2004

Total Topics: 54
Total Comments: 127
Posted Mar 12, 2007 - 8:43 AM:

As I said above I am using Mu Wordpress which doesn't hash value the cookie ie. rename themselves


And I believe there is also a "plugin" available for wordpress (stand alone) that can set the cookies to be global here.

However, Mu Wordpress is a multi user environment ie. you can set up mulitple blogs on virtual domains or across multiple virtual directories.

I think it would be cool to have links be able to integrate into this "platform"....as a "plugin".


Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Mar 13, 2007 - 10:48 AM:

You mean have wordpress use stuff from Links? That'd be something for someone familiar with wordpress to work on.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.