Author |
|
NelEU Newbie
Joined: 07 August 2013
Online Status: Offline Posts: 7
|
Posted: 12 August 2013 at 8:13am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 13 August 2013 at 12:10am | IP Logged
|
|
|
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 |
|
|
NelEU Newbie
Joined: 07 August 2013
Online Status: Offline Posts: 7
|
Posted: 13 August 2013 at 3:49am | IP Logged
|
|
|
Your solution works like a charm :)
Thank you very much for your help.
|
Back to Top |
|
|