This project has moved. For the latest updates, please go here.

SPGetCurrentUser in SharePoint 2013 _spUserId is undefined problem solved

Apr 29, 2013 at 4:59 PM
We were having problems getting SPGetCurrentUser to work in SharePoint 2013 but it had worked in SharePoint 2010. We are using SPServices 0.6.1. We kept getting an '_spUserId is undefined' error. We discovered that _spUserId has been deprecated in SP2013 and you are supposed to use _spPageContextInfo.userId instead. We made this substitution in our SPServices library and it solved the problem.
Apr 29, 2013 at 5:09 PM
You're bound to have even more problems with v0.6.1 and SharePoint 2013. You should consider upgrading to 2013.01 when I release it in the next week or so.