I am trying to retrieve the display name('firstname lastname') of a user who logs in the SharePoint site.
When I log into my SharePoint site I could see at the top right --'domain/user name'. So when I try to retrieve the display name of the user using SharePoint object model (item adding event receiver)
SPWeb web = properties.OpenWeb();
var strCurrentUser = web.CurrentUser.Name; or var strCurrentUser = web.CurrentUser.LoginName;
In both the cases strCurrentUser gives out 'domain/user' name.
Is there any way that i can get the full user name instead, like 'first-name last-name' or 'domain/first-name last-name'?