External User Authentication - Is user logged in - 08/15/2006 10:15 AM
I am working on programs which run seperate from UBB Threads but which incorporate the UBB threads membership data. I've had no problem figuring out the cookie that UBB threads sets and how to verify it against the w3t_Users data.
For that, I split the cookie. Find w3t_myid and w3t_key values, look up the U_Password field where the U_Number matches the w3t_myid cookie value. Then I take the values for the w3t_myid cookie and the value for the U_Password field and make an md5. If that md5 equals the w3t_key cookie value, the person is treated by my external programs as logged in.
My problem is that this will only work if when the forum member logs in s/he selects to be remembered and a cookie is set for w3t_key.
Looking at the w3t_Users fields, I see that a different md5 is set to the U_SessionID field. I believe if I can figure out how the value of that field is set that I could use it to see if a member is logged in, but I can not figure out how the value is arived at so I can not test for authentication.
Am I on the right track? Is there a better way to address this? Help and advice would be appreciated.
For that, I split the cookie. Find w3t_myid and w3t_key values, look up the U_Password field where the U_Number matches the w3t_myid cookie value. Then I take the values for the w3t_myid cookie and the value for the U_Password field and make an md5. If that md5 equals the w3t_key cookie value, the person is treated by my external programs as logged in.
My problem is that this will only work if when the forum member logs in s/he selects to be remembered and a cookie is set for w3t_key.
Looking at the w3t_Users fields, I see that a different md5 is set to the U_SessionID field. I believe if I can figure out how the value of that field is set that I could use it to see if a member is logged in, but I can not figure out how the value is arived at so I can not test for authentication.
Am I on the right track? Is there a better way to address this? Help and advice would be appreciated.