Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Churchley 272 posts 1258 karma points c-trib
    Apr 14, 2015 @ 15:49
    John Churchley
    0

    Get Member information in strongly typed view

    Hi,

    Anyone with any ideas on how to get Members information (Members.GetCurrentLoginStatus()) when you are in a strongly typed view?

    i.e. when the model is @model Umbraco.Web.Models.ContactFormViewModel not @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

    It's being used with a surfacecontroller.

    Thanks

     

  • John Churchley 272 posts 1258 karma points c-trib
    Apr 14, 2015 @ 15:52
    John Churchley
    100

    https://our.umbraco.org/documentation/reference/querying/membershiphelper/

    var memberShipHelper = new Umbraco.Web.Security.MembershipHelper(Umbraco.Web.UmbracoContext.Current);

    @memberShipHelper.GetCurrentLoginStatus().Name

Please Sign in or register to post replies

Write your reply to:

Draft