My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

03 February 2008

Sign in as Different User returns to portal home page

by Patrik Luca 0 comments

Tag



If multiple users are using the same client PC, you can run into following issue: when a new user logs in using the Sign in as Different User function, the user receives the error Access Denied. This error is thrown because the user is redirected by the Sign in as Different User function to the page which was last opened by the previous user and the new user doesn't has rights on this page. This can be confusing for end-users.

You can adapt the INIT.JS file in the 12\TEMPLATE\LAYOUTS\<lcid> hive as such that upon execution of the Sign in as Different User function, the page being displayed is the home page of the portal.

Look for the LoginAsAnother function in the INIT.JS file and adapt it as follows:

function LoginAsAnother(url, bUseSource){
document.cookie="loginAsDifferentAttemptCount=0";
if (bUseSource=="1") {
GoToPage(url);
}
else {
var ch=url.indexOf("?") >=0 ? "&" : "?";
// url+=ch+"Source="+escapeProperly(window.location.href);
url+=ch+"Source=/default.aspx";
}
}

Comments 0 comments

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Subscribe feeds rss Recent Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Live Traffic Feed

Recent Visitors

Blog Archive

My Blog List

Followers

Guest Links