In an old community we had a HTTP request that fetched the email of the signed in user to get this to another service so that we were able to have SSO without actually having SSO.
What the script did was the following:
When you press the link, the email to the logged in user is retrieved.
Then the following code was executed:
$ client = new Zend_Http_Client ("https://online.superoffice.com/cust9654/CS/scripts/customer.fcgi?action=safeParse&includeId=createSe...". $ email);
$ response = $ client-> request ("GET");
$ result = trim ($ response-> getBody ());
Here's a GET call against the address you see where the email to the logged in user is added.
What we get back from that call is a sessionkey that is used to send the user to the following location:
$ this -> _ redirect ("https://online.superoffice.com/cust9654/CS/scripts/customer.fcgi?_sf=0&custSessionKey=". $ result. "& customerLang = no & noCookies = true & action =". $ this-> getRequest () -> getPost ("action"));
Here you see that $ result is entered as custSessionKey in the URL and action is set to blank or newTicket if you choose to register new case etc etc.
Do anyne do this or know how to do this in Lithium (we are using SSO, but the service we have with this link is not connected to SSO and have unique login)?
For the first part to obtain the email:
You would use the appropriate FreeMarker context object to obtain the email address of a member. For the email of the currently signed in user the user context object would be your friend. So in your custom component's FreeMarker code you would use
P.S.: This question is probably better suited for the Developer Discussion board.