ccoenraets / forcejs

Micro library to use the Salesforce REST APIs in JavaScript Apps
175 stars 61 forks source link

Adding a getUserId function #2

Closed toddhalfpenny closed 10 years ago

toddhalfpenny commented 10 years ago

Adds a function to retrieve the userID for the logged in user.

Note I have stripped the userID from the full value that is being reported back following the login. i.e. if oauth.id = "https://login.salesforce.com/id/00DR0000000ABCDMAK/00520000001ABCoAAO" then force.getUserId() returns "00520000001ABCoAAO"