I am trying to do a simple thing ( so it seems) I want to get the first name of the current user..
The first name is under the member details tab in the umbraco backend.
I cannot access these properties.
using v7
Can someone please help this is what i have so far which just gets the current member username
@if (Membership.GetUser() != null)
{
var Username = Membership.GetUser();
if (s != null)
{
@Html.Raw("Hello, " + username)
}
}
@if (Membership.GetUser() != null)
{
var memberShipHelper = new Umbraco.Web.Security.MembershipHelper(Umbraco.Web.UmbracoContext.Current);
var Username = memberShipHelper.GetCurrentMember();
var test = Username.GetPropertyValue("firstName");
if (test != null)
{
@Html.Raw("Hello, " + test)
}
}
get member first name
Hi,
I am trying to do a simple thing ( so it seems) I want to get the first name of the current user.. The first name is under the member details tab in the umbraco backend.
I cannot access these properties.
using v7
Can someone please help this is what i have so far which just gets the current member username
Thanks
Nav
anyone else wants to do this, this is how:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.