Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using sp2010 I have computability problem with IE7 ,where a piece of the ribbon left in top of the screen. I want to remove it if the user come to the anonymous website with JavaScript. My Question is it possible to know if the is it anonymous or admin website from js

tnx

share|improve this question
add comment

1 Answer

Yes, it is possible to check the current user login using JavaScript or Jquery service api, here's couple of questions that are showing how to get user using JavaScript,

SharePoint 2010 get username for web application

How to get current user with javascript?

Once you get current user, all you need to do is use if and else statement to figure is it out if its admin or anonymous.

http://www.learningsharepoint.com/2011/05/18/get-current-users-loginname-ecmascript-sharepoint-2010/

You might will need to find out what username SharePoint uses for anonymous users.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.