Liam Cleary recently
wrote a
blog post on how to "Hide the My Settings link" which is part
of the welcome menu. Although his solution is perfectly valid and
probably quicker and easier than the alternative solution that I
offer - It did have some issues.
Firstly he edited the welcome.ascx user control. Like editing an
application page this will affect all sites for that instance of
SharePoint.
Secondly this only covers the scenario where the user actually
clicks on the "My Settings" link. There are many other access
points to the User Information page. For example any list
edit/display form will have a link to the page. Thats any instance
where you see the following audit info:

So creating a custom "My Settings" link only covers half the
problem.
The question then is - how to create a solution that doesn't
involve editing shared resources and covers every possible link
scenario??
The answer lies in the userdisp.aspx page. In the
AdditionalPageHead placehoder tag you will find the following
control declaration:
<SharePoint:
DelegateControl
runat="server"
id="DelctlProfileRedirection"
ControlId="ProfileRedirection"
Scope="Farm"
/>
What we need to do is create a user control, that redirects the
user to a custom page. The user control will the be activated via a
feature.
Brief Steps:
- Create a custom user display page and place it in the LAYOUTS
directory.
- Create a new User Control that has code to redirect the user to
your custom page.
- Create a feature for the delegate control. This feature will
cause your custom control to run in place of the
SharePoint:DelegateControl declaration. The feature should be
scoped to "farm".
I have kept the steps very brief as I have a sample solution
with all the necassary code in it.
Download the sample code from here:
http://zac.provoke.co.nz/Samples/CustomUserProfile.zip
To run the sample, copy CustomUserProfile.wsp file and
Deploy.cmd to your WSS server and run the following command from a
prompt:
deploy.cmd http://yoursitenamehere
Once the feature is activated, navigating to My Settings page
will redirect the user to userprofile.aspx.

Not a very useful custom profile page, but thats what part 3 is
for :)
The only problem now is that the feature's scope is set to farm,
so the user control will be run for all sites. To solve this you
can create a second feature, and then before redirecting check for
the features existance. This is also included in the sample
solution.
Part 3 will show how to easily customise the actual User Profile
page.
For more info on delegate controls have a look at the following
resources:
http://msdn2.microsoft.com/en-us/library/ms470880.aspx
http://sharepointnutsandbolts.blogspot.com/2007/06/using-delegate-control.html