Friday, June 17, 2011

Hiding sign in as a different user option

sometimes we want to hide the option to allow user to log in with different user. We can have our custom master page applied to site and then we would like to place this in the web part in master page in 2010. or if you want that option not be available in certain page, then add content editor web part and use below code to hide it.

<script src="jquery-1.4.2.min.js" type="text/javascript"></script>

<script type="text/JavaScript">

jQuery(document).ready(function($) {

var objects = document.getElementsByTagName("ie:menuitem");

for (var i = 0; i < objects.length; i++) {

itm = objects[i];

if (('#' +"LoginAsDifferentUser") != -1) {

$('#' +;





You should be good to go.

No comments:

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to