Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: PHP Session Name Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
NelEU
Newbie
Newbie


Joined: 07 August 2013
Online Status: Offline
Posts: 7
Posted: 12 August 2013 at 8:13am | IP Logged Quote NelEU

Hello,

I was wondering if there is a PHP session which I could use to access the email account value. For example something like $_SESSION['emailaddress'].

The reason why I need this is because I would like to echo the email address in an external php script and not within the templates.

If there is no such session, could you point me to a file where I could just set such a session - I guess it would make most sense to set such a session when a user logs in while deleting it when the user logs out.

Your help would be greatly appreciated.

Back to Top View NelEU's Profile Search for other posts by NelEU
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 13 August 2013 at 12:10am | IP Logged Quote Igor

There's no straightforward way to get those data as they're simply not stored anywhere, session is not used at all, and cookies keep account ID in securely encoded form. WebMail itself uses AJAX request for fetching that info, but requests are signed in a special way which cannot be simulated by external app.

I can think of the only way to get through this: libraries/afterlogic/common/managers/integrator/manager.php file contains SetAccountAsLoggedIn method, and in its last line, cookie containing user ID is saved. You can add another cookie there which is going to hold $oAccount->Email value, and then you can grab that value from external app, assuming it's within the same domain of course.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
NelEU
Newbie
Newbie


Joined: 07 August 2013
Online Status: Offline
Posts: 7
Posted: 13 August 2013 at 3:49am | IP Logged Quote NelEU

Your solution works like a charm :)

Thank you very much for your help.

Back to Top View NelEU's Profile Search for other posts by NelEU
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide