wood burning stoves 2.0*
The moose likes JForum and the fly likes Auto Login Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Auto Login" Watch "Auto Login" New topic
Author

Auto Login

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello,
JForum is embedded in our website. We want users to able to comment without logging on or registering to JForum. Meaning, we want them to be able to post messages with their defined users in our system. So, if a user is registered and logged in OUR website the user value is passed to JForum and used whenever nescessary. What are the steps for doing this?

Where do we need to change the code? we don't want to, if possible, to register the user in the JForum database.
Thanks for your help,
Eytan.
[originally posted on jforum.net by eytankab]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Take a look here:

http://www.jforum.net/confluence/display/integration/Overview

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks!
OK I embedded some code in the JForum.java class which does the login and registration behind the scenes. The user is logged (I see - your last visit etc...) and when I post messages I get my user and not anonymus.
Now - I still have two questions :
1. Why do I still get the forum login when I want to send a private message? Seems like I am logged out for some reason.
2. When I go to "My Profile" I get the non-editable profile - seems I get logged out.
3. I want the user to be redirected to our registration page when he tries to post a message or private message. In what java class should I put the redirect statement?
[originally posted on jforum.net by eytankab]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
1) and 2) Looks like your changes produced some bug in the authentication process.

3) Take a look in the class PostAction.java

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
OK. I got it...I had to put the "logged" variable in the session AND in the context. Now it works.
[originally posted on jforum.net by eytankab]
 
Don't get me started about those stupid light bulbs.
 
subject: Auto Login