Members.GetCurrentMemberProfileModel(); Dont get all data of current members
What is the Rights Way to get all the data from members, so that i Can show it in the frontend, so that the members Can se he’s own data.
I've tried everything in the documentation. No matter what I do, I can only view the name and email, but the proberty i have made my selv for the profile image, dont show up
it is in umbraco 8
The code
@{
Layout = "master.cshtml";
}
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using Umbraco.Web.Models
@using Umbraco.Web.Controllers
@{
var loginStatusModel = Members.GetCurrentLoginStatus();
var logoutModel = new PostRedirectModel();
//send bruger til forsiden efter log ud
logoutModel.RedirectUrl = "/";
}
@if (loginStatusModel.IsLoggedIn)
{
Billede her
@{
var medlem = Members.GetCurrentMember();
var test = Members.GetCurrentMemberProfileModel();
var test2 = Services.MemberService.GetDefaultMemberType();
var enTEst = Umbraco.MembershipHelper.GetCurrentMember();
var getCurrentUser = ProfileModel.Profile();
var loggedOn = Umbraco.PublishedContent.Members();
var getCurrentUser = Umbraco.BusinessLogic.User.GetCurrent();
var getCurrentUmbracoUser = Umbraco.helper.GetCurrentUmbracoUser();
var securityCurrentUser = UmbracoContext.Security.CurrentUser;
var umbracoEnsuredPageCurrentUser = Umbraco.BasePages.UmbracoEnsuredPage.CurrentUser;
}
<div class="container">
<div class="col-md-4">
<div class="form-control">
<h3>Hej @medlem.Name Du er nu logget ind på din side</h3>
<p>@enTEst.Properties</p>
</div>
</div>
</div>
</div>
var agents = Services.MemberService.GetMembersByMemberType("Member");
foreach (var item in agents)
{
@item.Name
<br />
@item.ContentTypeAlias
<br />
@item.Email
<br />
@item.GetValue("address")
}
using (Html.BeginUmbracoForm<UmbLoginStatusController>("HandleLogout"))
{
<fieldset>
<legend>Logout</legend>
<button>Logout</button>
</fieldset>
@Html.HiddenFor(m => logoutModel.RedirectUrl)
}
Members.GetCurrentMemberProfileModel(); Dont get all data of current members
What is the Rights Way to get all the data from members, so that i Can show it in the frontend, so that the members Can se he’s own data.
I've tried everything in the documentation. No matter what I do, I can only view the name and email, but the proberty i have made my selv for the profile image, dont show up it is in umbraco 8
The code
@{ Layout = "master.cshtml"; } @inherits Umbraco.Web.Mvc.UmbracoViewPage @using System.Web.Mvc.Html @using ClientDependency.Core.Mvc @using Umbraco.Web @using Umbraco.Web.Models @using Umbraco.Web.Controllers @{ var loginStatusModel = Members.GetCurrentLoginStatus(); var logoutModel = new PostRedirectModel(); //send bruger til forsiden efter log ud logoutModel.RedirectUrl = "/"; } @if (loginStatusModel.IsLoggedIn) {
Billede her
}
Is it just GetPropertyValue() instead of GetValue()?
I have try that to :)
mikkel, can you post a screenshot of that property? it's alias name, it's type and MemberType Name.
I was able to get address property value using the following code:
Preview:
Yes ofcouse i Will do it tommorow when i get home from work I have to try it Again and se if i Can do the same AS you 🙂
Here is my member documenttype i have profilbillede and adresse and i cant acces them !
I used the following code:
Preview:
you are the best. i have seach for that problem a long time now :D and now it works. Thanks for your help
is working on a reply...