Quick Authentication

Posted by Brian Moon 
Re: Quick Authentication
March 02, 2007 03:19PM
The version 5.1 of this script handles this by using $PHORUM["user"] instead of running the code. Now, if you are including this using auto_prepend, its getting included too early probably to make it all work right. I include_once mine in my main site header.php. If I have a script that needs it before that, I include it in that script using include_once, thus it is loaded before header.php

Brian - Personal Blog
Re: Quick Authentication
April 05, 2007 06:24AM
I would need as well the possibility to return the user to the page from where he called the login-function. So is there any progress in that?

ciao, Thilo
Re: Quick Authentication
April 05, 2007 06:43AM
Any progress? I didn't know there was work in progress at all ;-) There are two mechanisms available in login.php for changing the page redirect.

1) Include a "redir" hidden field in your login form, which tells where Phorum must jump to after logging in.

2) There is a hook in the login.php script, which can be used to override the default redirect behavior. This is the "after_login" hook. See docs/creating_mods.txt for a description of that hook.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Quick Authentication
February 06, 2008 12:09PM
does it affect working with phorum if i alter the
($_COOKIE["phorum_session_v5"]
"phorum_session_v5" to something else?
Re: Quick Authentication
February 06, 2008 12:15PM
yes, as thats the phorum-cookie defined in the phorum-code too.


Thomas Seifert
Re: Quick Authentication
February 13, 2008 11:54AM
is there an example of the after_login hook anywhere?

i've tried changing the hidden redirect field but my pages keep redirecting to index.php :(
Re: Quick Authentication
February 13, 2008 12:59PM
does this have a known problem if you login from an external page?

usingn the quick authentication i've got a page set up if logged in say "hey username", else display the login form.

when the user logs in from this form as a fresh login, it adds the phorum_v5_session onto the end of the url.

i think this causes problems when the user navigates the site between phorum and the quick auth pages.

it seems fine when the user logs in from phorum from fresh.



Edited 2 time(s). Last edit at 02/13/2008 02:04PM by artisites.
Re: Quick Authentication
February 13, 2008 05:20PM
You need to set the temporary cookie that is set by the standard login.php script too (search for setcookie in that script). The temporary cookie is used to determine whether the browser supports cookies. If it doesn't (meaning: if the login script doesn't see the temp cookie being set), then Phorum will fall back to URI authentication. This is what you saw on your site: the session id being added to all the URLs.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Quick Authentication
February 14, 2008 06:29AM
i've set this. it was working for a while, til i cleared my cookies and relogged in, first through the external page using QA and it's started playing up again.

it seems to be fine as long as the first login comes from phorum.

i'll just force the user to login from login.php
Re: Quick Authentication
February 14, 2008 07:09AM
Quick authentication and external login are two different things. Quick authentication is to quickly see if a user is authorized in Phorum. External authentication is putting a login page up somewhere else on the site, outside the Phorum tree.

The only reason there is for getting session ids in the URL, is if the cookie is not set on login. Go to your login page and check your cookies to see if it's there (or tell us the URL where to look if this site is available in public).


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

Click here to login