Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/currentuser";
- $.ajax({
- url: url,
- headers: {
- Accept: "application/json;odata=verbose"
- },
- async: false,
- success: function (data) {
- var items = data.d; // Data will have user object
- console.log(items);
- },
- eror: function (data) {
- alert("An error occurred. Please try again.");
- }
- });
Add Comment
Please, Sign In to add comment