Passing authentificator using own login
Posted by luuuki
|
March 21, 2007 09:21AM |
Admin Registered: 21 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Passing authentificator using own login March 21, 2007 01:42PM |
Registered: 18 years ago Posts: 8 |
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
Hope this was my last question! Thanks again for your great help.
Lukas
|
March 21, 2007 02:17PM |
Admin Registered: 21 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Passing authentificator using own login March 22, 2007 05:02AM |
Registered: 18 years ago Posts: 8 |
|
March 22, 2007 07:12AM |
Admin Registered: 21 years ago Posts: 8,532 |
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
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.
