This is all for SharePoint 2010. I have in my form the ability to put in a user in a people picker and then the users click a button that pulls in the user's email address and dept phone number. This works fine with any owners of the site (people who have full control), however it works with no one else. I get access denied when $(xData.responseXML) runs. I'm not sure if this can be fixed within the site collection level of if there are permissions that need to be changed in Central Admin (which is not an option). If anyone knows a fix, I'd appreciate it...or if anyone knows a better way to get another user's phone number (email works straight from people picker), I'll take that as well.
Basically what I'm doing is extracting the user's email from the people picker, using SPServices to GetUserLoginFromEmail and then using the login and SPServices GetUserProfileByName to get the phone number. Here is the full code:
When I hard coded my login and ran the page, the GetUserProfileByName worked fine. So it only seems to be the GetUserLoginFromEmail that is not working with the permissions the way they are.
Thanks for any and all help/suggestions. By the way, client-side code is my only option at this point.