Somebody else idea : save this as username.aspx in
%Drive%:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033
and then run as
http://%server%/_layouts/1033/username.aspx
<html>
<%@ Page language="C#"%> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version= 11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version= 11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace=" Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<% SPSite spServer = SPControl.GetContextSite (System.Web.HttpContext.Current); SPWeb spWeb = SPControl.GetContextWeb(System.Web.HttpContext.Current); %>
<%
try
{
spServer.CatchAccessDeniedException = false;
string welcome = "Welcome to the " + spWeb.Title + " site. ";
string welcome2 = "You are logged on as: " + spWeb.CurrentUser.Name ;
}
catch(System.UnauthorizedAccessException ex)
{
Response.Write(ex.Message.ToString());
}
%>
<BODY height=40px scroll="no">
<TABLE ><TR><td style="font-family:Arial; font-size:10pt; font-weight:bold; color:#af0b1c"><%=welcome%> </td></TR>
<TR><td style="font-family:Arial; font-size:10pt; font-weight:bold; color:#000000"><%=welcome2%> </td></TR></TABLE>
</BODY>
</HTML>