views:

37

answers:

1

hi all, I want to customize the sign out functionality in sharepoint. I want to redirect to Home page after signout button is clicked. I used the following code :

function _spBodyOnLoad()
{
 try
 {
  document.execCommand("ClearAuthenticationCache");
                window.location=home page url;
 }
 catch (e) {} 
}

but the problem here is that it is redirecting to home page but it shows that user is logged in, but I want to show web site as when anonymous access the site. how to do this?

A: 

You can add a Custom Action menu to have your own signout menu item and redirect the user to your pwn page, do your stuff and redirect to the home page. At the same time you will have to remove the default sign out menu item. Welcome.ascx is the file which you will have to edit to remove this option. This is under 12 hive. keep in mind this is not a good solution and it will affect all the sharepoint sites.

Another option is to hide the whole menu and add your own Signout link. You can hide this in control in the master page.

Shoban