I am using
SPServices to get current user like this:
var user = $().SPServices.SPGetCurrentUser();
This works fine in the main site, but when I use the same line of code in subsite, I get:
Uncaught TypeError: Cannot read property 'SPGetCurrentUser' of undefined
I couldn't find too much information about it, but I assume, I can only use this method on the main site?
If so, what alternatives (without asynchronous call) would you suggest to get current user on subsite level? I need
SPUser object as a return value.