Roundcube Community Forum

Third Party Contributions => Old Style Plug-Ins => Topic started by: firemail on May 12, 2008, 01:52:53 PM

Title: Session not accessible from outside
Post by: firemail on May 12, 2008, 01:52:53 PM
Hi I'm a Round CUbe Veteran.
I've installed and modofied almost all plug-ins and have personally worked out all the bugs except for one(1).

When logged in users do a google search they are taken out of roundcube to the results page.

I've looped back the username by captureing the $SESSION['username'] and sending it along with the google query as a hidden field. This allows me to "show" the username outside of round cube. This means I have to appemnd &username=$GET['username'] to every link in the root site.

Can I mod the RoundCube cookie to be accessible from root site?
I don't want to cancel the round cube session and I don't want to have to wrewrite the roundcube cookie in my site.

I would rather use session in root site (once) use $SESSION['username'] instead.
I tried this at top of index.php before all HTML and different variations, but still doesn't work.


if (isset($_SESSION['username']))
{
$username = $_SESSION['username'];
echo "Welcome $username";
}
else
{
$username = $_POST['username'];
session_start();
$_SESSION['username'] = $username;
$Lusername = $_SESSION['username'];
echo "Welcome $Lusername";
}

See it in action : http://baluchon.net/phpsearch/?lang=en
username: phpsearch
password: login
Use the Webmail link to login and do a google search. ( Notice the links in results include a tag!??)

Alex
Title: Me too!
Post by: ar1000 on October 30, 2008, 05:08:30 PM
I also want external access to the Roundcube session. Help?!?
Title: Session not accessible from outside
Post by: rosali on October 31, 2008, 02:22:44 AM
What about to pass the session_id with the URL and then access roundcube database table "session" and unserialize field "vars"?
Title: Session not accessible from outside
Post by: rnbguy on May 29, 2009, 06:14:14 AM
can you explain how i can access session_id from main.inc?

ive written a function in main.inc
Title: Session not accessible from outside
Post by: rnbguy on May 29, 2009, 06:35:40 AM
ive figured it out, how do you unserialize vars to compare it to session_id?
Title: Session not accessible from outside
Post by: JohnDoh on May 29, 2009, 07:11:50 AM
would changing $rcmail_config['session_domain'] in your config help? then you can access the cookies from other subdomains.