Firefox PHP

Passing authentificator using own login

Posted by luuuki 
Re: Passing authentificator using own login
March 21, 2007 09:21AM
You should really read the rest of the embedding module. You are reinventing the wheel here ;-) The embedding module does some additional work (from the top of my head, this is done in the common hook) to get rid of the URI authentication after Phorum has recognized the user.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Passing authentificator using own login
March 21, 2007 01:42PM
Thank you very much for your help. Just to refresh your memory: The function were you "clean that mess" as you call it, is common_pre_user. ;) But you just unset the [GET_VARS] without checking if cookies are enabled or not (by forum or by browser). Or is that done somewhere else? Shouldn't it do it when i just aks if cookies are enabled by forum AND if the browser has enabled cookies and then unset the [GETVARS} and else not?

Hope this was my last question! Thanks again for your great help.

Lukas
Re: Passing authentificator using own login
March 21, 2007 02:17PM
In the module, I tell Phorum that cookies are not used by overriding the "use_cookies" setting in the common_pre hook. So any logic around "are cookies enabled?" is futile. All that Phorum sees is a user which does not use cookies, but URI authenticattion to keep track of the user session.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Passing authentificator using own login
March 22, 2007 05:02AM
Well, I did this, too. But when I disable cookies in my browser im not logged in anymore because the sessionid is no longer saved in the GET_VARS.
Re: Passing authentificator using own login
March 22, 2007 07:12AM
Well, I do not know what goes wrong on your setup. I just tested a simple embedding setup with the embed module and disabled cookies. Things went just fine after that. I still was logged in as the user returned by $connector->get_user_id(). So something is going wrong in your customized code. Time to do some debugging I guess.

One thought: isn't the site which you are integrating with depending on cookies? So see if get_user_id() is really returning the user_id that you are expecting there. If you made a direct copy of my code, then it sounds like get_user_id() is return NULL instead of a valid user_id.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login