Roundcube Community Forum

Third Party Contributions => Old Style Plug-Ins => Topic started by: techdude on May 14, 2008, 11:14:14 AM

Title: Forum Plugin
Post by: techdude on May 14, 2008, 11:14:14 AM
I have my users login to their email and I put a button in RoundCubeWebmail to access Forum.  When the user clicks the button, the system automatically forwards the user to a forum (such as phpBB) and automatically logs the user in.  Pretty much, I would like to link the logins for the forum and the webmail together.  

How do I do this?
Title: Forum Plugin
Post by: bpat1434 on May 17, 2008, 10:25:55 AM
You would need to create a middle-script which queries the forum database for the username based upon the email address.  From there, you'd have to decide whether or not you want them to verify their password or not.  If not, then they'd have to somehow save their forum password.  Typically forum passwords are different from email passwords.

So you have two options:

1.) Remove registration from the forum and modify RC so that when they log in the first time, they are registered in the forum.

2.) Add their username and password to the forum to their preferences, and log them in intermittently when they click the button.

That's really the only two options.
Title: Forum Plugin
Post by: techdude on May 18, 2008, 09:34:13 PM
Yea...still learning PHP.  Anyone have a script to do this?
Title: Forum Plugin
Post by: EinfachClicken on May 26, 2008, 09:36:33 AM
Why go through all of that effort?
According to our site stats, between Firefox and IE our combined traffic comes in at around 93% or rather 93 out of 100 users are browsing with FireFox or Internet Explorer. About 5% are using Opera & Netscape. Most people who use the internet regularily have multiple passwords and accounts for shopping, ebay selling, email, online banking, online service logins, credit cards, paypal accounts, and so on. That's exactly why most browsers these days support the ability of storing and reusing user names & passwords .... so that when a user goes back to the site (such as this forum) :D where a login/password are required, the browser recognizes this immediately and enters the correct information automatically.

I actually don't know anyone who doesn't use those browser features ... that's specifically what those features have been designed for - to make logging in a lot easier and faster. So, even if you were to do what you suggested above, chances are that about ... 95% (or more) of your guests or members wouldn't even need or make use of such an option since every login after the 1st one would be almost instant ... ???
Just some thoughts to try and help save precious time!
Title: Forum Plugin
Post by: techdude on June 25, 2008, 12:14:39 AM
Yea, but it makes it easier for the users...I have implemented SSL...so anyone know how to do this?
Title: Forum Plugin
Post by: bpat1434 on June 25, 2008, 07:42:52 AM
Yes, the answers are above.  I don't really have time to code an example for you because real-life is getting in the way.

Basically, you can do 2 options:

All users provide email address & password to be stored in DB for later
   If you were using vBulletin or another forum that allows you to automatically set up custom profile fields, you could easily use these and set them to "invisible" for everyone.  Then when they log in to the forum, create a cookie for the webmail as well.  This should log them in automatically.

Then go into the RoundCube source and modify th login page so that it redirects back to the forum login.  I know that using the Simple Machines Forum you can define where they'll be redirected to after login by setting a session variable to the URL of RoundCube.

Use custom registration script
   You'd have to create your own custom registration script which would insert both users into both databases (RC and forum) and then either (1) create your own login script to create two cookies for the user (forum and RC) or (2) modify a login to create a second cookie for the user.

Either way will work, you just have to put time and effort into it.  I don't have the time to code it right now because it could become rather tricky depending upon the forum software.