Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 6123130

Browse files
committed
Added 'currentUser' to retrieve the current users information.
1 parent bed85b4 commit 6123130

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

forcetk.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,16 @@ if (forcetk.Client === undefined) {
304304
});
305305
}
306306

307+
/*
308+
* Lists the information about the current user including their ID, username,
309+
* email address and more. Uses the Chatter REST API.
310+
* @param callback function to which response will be passed
311+
* @param [error=null] function to which jqXHR will be passed in case of error
312+
*/
313+
forcetk.Client.prototype.currentUser = function(callback, error) {
314+
return this.ajax('/' + this.apiVersion + '/chatter/users/me/', callback, error);
315+
}
316+
307317
/*
308318
* Lists summary information about each Salesforce.com version currently
309319
* available, including the version, label, and a link to each version's

0 commit comments

Comments
 (0)