Roundcube Community Forum

 

Session not accessible from outside

Started by firemail, May 12, 2008, 01:52:53 PM

Previous topic - Next topic

firemail

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

ar1000

I also want external access to the Roundcube session. Help?!?

rosali

#2
What about to pass the session_id with the URL and then access roundcube database table "session" and unserialize field "vars"?
Regards,
Rosali

rnbguy

can you explain how i can access session_id from main.inc?

ive written a function in main.inc

rnbguy

ive figured it out, how do you unserialize vars to compare it to session_id?

JohnDoh

would changing $rcmail_config['session_domain'] in your config help? then you can access the cookies from other subdomains.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...