I have used following code on Nintex forms on SharePoint 2013 to get current user details,
var userid = _spPageContextInfo.userId;
var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ");
but it does not work on O365. Is there any equivalent to this approach ? or else what is the best way to get user details?
Error: _spPageContextInfo is undefined