FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » returnto & auto-login
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
returnto & auto-login [message #27980] Tue, 04 October 2005 07:51 Go to next message
urbanhorizon is currently offline  urbanhorizon   United Kingdom
Messages: 8
Registered: August 2005
Karma: 0
Junior Member
I've got a webpage which has two buttons. One needs to log you into the FUDforum and display the main page. The other needs to log you into the FUDforum and then display a particular forum.
I've got the login working fine by just having the buttons submit a form to the FUD login page, however I thought you could send returnto as a form field to tell it where to go after the login, but it doesn't seem to work.

any suggestions?

OR, i just thought of an alternative. How does the FUDforum determine if a user is logged in? If it's based on some session variables, then I can set these myself to do the auto-login, and then just direct to the correct page.

Thanks,
Mark

[Updated on: Tue, 04 October 2005 08:20]

Report message to a moderator

Re: returnto & auto-login [message #27984 is a reply to message #27980] Tue, 04 October 2005 13:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The forum determines the user status via the user_id field stored inside the sessions record. The returnto field is stored in the database based on previous request, so if you want to change it update the returnto field in the relavent session record.

FUDforum Core Developer
Re: returnto & auto-login [message #28001 is a reply to message #27980] Wed, 05 October 2005 08:31 Go to previous messageGo to next message
urbanhorizon is currently offline  urbanhorizon   United Kingdom
Messages: 8
Registered: August 2005
Karma: 0
Junior Member
ok, but what if the user has never logged in to the forum, then they wont be in the sessions record to update the returnto.
Re: returnto & auto-login [message #28008 is a reply to message #28001] Wed, 05 October 2005 13:44 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If the user does not have a session I'm afraid you'll need to modify login.php.t to have some pre-determined default built-in other then the front page of the forum.

FUDforum Core Developer
Re: returnto & auto-login [message #28023 is a reply to message #27980] Thu, 06 October 2005 10:37 Go to previous messageGo to next message
urbanhorizon is currently offline  urbanhorizon   United Kingdom
Messages: 8
Registered: August 2005
Karma: 0
Junior Member
i just found the api for login supplied with FUDforum and am trying to write the same thing in ColdFusion, to edit the ses table so that it logs in a user automatically. I can't get it to work though, do you know what fields in the ses table FUDforum bases if you are logged in or not on? Does it use the time_sec to check when you logged in?

Thanks,
Mark
Re: returnto & auto-login [message #28031 is a reply to message #28023] Fri, 07 October 2005 16:00 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
time_sec is only used if the session is a URL session. The main thing you need is the sys_id field, which the ses_make_sysid() function generates.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem with residing new forum
Next Topic: Problem restoring the forum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 03:06:32 GMT 2024

Total time taken to generate the page: 0.02282 seconds