Displaying AD first name instead of network ID

Mar 20, 2013 at 6:45 PM

Is there a way to change the user.cshtml code to show the visitors first name from AD instead of their network ID?

Currently I see this in the footer:

Welcome, ecke1234

What I'd like to see is this:

Welcome, Mark

Is this possible?

Mar 20, 2013 at 8:17 PM
Hi meckeard,

I think my code is not for this task. In your case more complex implementation required. Now as I remember Orchard ported on the .Net 4.5 and you can use special class from Directory Services to implement the new authorization provider for forms instead windows authentication or getting additional properties from AD for the current user and then change IUser implementation or write the new content part with more properties (like first/last name phone etc). After this I recomment to make a new theme with the new fields used in User.cshtml, this way will not cause problems in the future when you update Orchard. Sorry but I have no time now to upgrade my code and add the new features, may be later...