Capture user login in Portal

 7 Replies
 0 Subscribed to this topic
 14 Subscribed to this forum
Sort:
Author
Messages
JoeS
Basic Member Send Private Message
Posts: 20
Basic Member

I am trying to "capture" a user's userid when they log into Portal in LSF9.  Is there a server variable or session variable that this value is stored?

Joe

John Henley
Send Private Message
Posts: 3351

You can use the getAttribute method of the oUserProfile to figure out the user's login id:

function FORM_OnInit()
{
alert( portalWnd.oUserProfile.getAttribute("id"))
alert( portalWnd.oUserProfile.getAttribute("lawsonusername"))
}

Thanks for using the LawsonGuru.com forums!
John
JoeS
Basic Member Send Private Message
Posts: 20
Basic Member

John, do you know what session variable (name) is used to store the user_id?

Thanks. Joe

John Henley
Send Private Message
Posts: 3351
Try RMID
Thanks for using the LawsonGuru.com forums!
John
John Henley
Send Private Message
Posts: 3351
You can also try doing this:
http://SERVER/sso/SSOServlet?_action=PING which return a short XML document that has USERNAME as a node.
Thanks for using the LawsonGuru.com forums!
John
Deleted User
New Member Send Private Message
Posts: 0
New Member
Posted By John Henley on 6/03/2008 12:29 PM
You can also try doing this:
http://SERVER/sso/SSOServlet?_action=PING which return a short XML document that has USERNAME as a node.



Is it possible to get the above response in JSON notation instead of XML?

We are trying to develop a standalone web application that checks to see if the user has previously logged into Lawson.  The above (XML example) gives us the information we need but, due to cross-domain restrictions on XML and JavaScript, we don't have the ability to do anything with the document.  If we could get this response in JSON format, or if there is another solution available, we would be in great shape.

 

Thanks in advance for any responses!

JaneenL
New Member Send Private Message
Posts: 1
New Member
I'm having trouble parsing this file to get the user name name node.
http://SERVER/sso/SSOServlet?_action=PING

I only receive these elements:
XML Declaration: xml version="1.0" encoding="ISO-8859-1"
- Attribute: version Value: 1.0
- Attribute: encoding Value: ISO-8859-1
Element: ERROR
Element: MSG
Element: DETAILS

Any ideas?

Thanks,
Janeen
allbusinessgomab
Advanced Member Send Private Message
Posts: 31
Advanced Member
You can also do http://server/servlet/Profile. That will return lawsonuserlogin and lawsonusername.