Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have a property in a doctype which uses Datatype User Picker. I am trying to get the name of the person selected on this property.
I tried a suggestion from another topic: https://our.umbraco.org/forum/templates-partial-views-and-macros/77098-getting-username-from-user-id#comment-246470
var member = Umbraco.TypedMember(CurrentPage.author); @member.Name
But that did not work. On CurrentPage.author I get the user ID, but in method Umbraco.TypedMember(CurrentPage.author) I have a null result. I'm using Umbraco 7.6.4
This is how I fixed this:
var author = umbraco.BusinessLogic.User.GetUser(CurrentPage.author); @author.Name
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting name from user picker property
Hi,
I have a property in a doctype which uses Datatype User Picker. I am trying to get the name of the person selected on this property.
I tried a suggestion from another topic: https://our.umbraco.org/forum/templates-partial-views-and-macros/77098-getting-username-from-user-id#comment-246470
var member = Umbraco.TypedMember(CurrentPage.author); @member.Name
But that did not work. On CurrentPage.author I get the user ID, but in method Umbraco.TypedMember(CurrentPage.author) I have a null result. I'm using Umbraco 7.6.4
This is how I fixed this:
is working on a reply...