Search code examples
c#visual-studio-2008sharepointsharepoint-2007

Get logged in user details in sharepoint c# webpart


After much wrangling I have a development environment for building sharepoint webparts in c#.

I'm completely new to SP development, so I haven't quite found the various API docs, so I'm hoping someone can help get me started.

Eventually, I want to write a simple web part that allows its user to display different content depending on who the current user is.

What I'd like to do first though is just build a dead simple webpart that will simply print out the current user's details - username, full name and any permissions groups that they have.

Thanks


Solution

  • SPContext.Current.Web.CurrentUser