Copied to clipboard

Flag this post as spam?

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


  • Niels Lynggaard 192 posts 550 karma points
    Feb 16, 2014 @ 01:28
    Niels Lynggaard
    0

    Where has User.CurrentUser() gone in V.6 API?

    Hi Guys.

    I'm updating a rather old site, and has succesfully upgraded to v. 6.1.6. Now it's time to go over the code and update that.

    So... How do I manage to get the current user in V.6 API?

    I want to "tanslate" the old code:

    User.GetCurrent().UserType.Alias

    to something else, but I've been looking high and low for a service or something else to do that. Where has this gone?

    Cheers,

    Niels

  • jivan thapa 194 posts 681 karma points
    Feb 16, 2014 @ 11:17
    jivan thapa
    100

    It returns the Member type.

    if (User.Identity.IsAuthenticated)
    { var memberTypeAlias = Member.GetCurrentMember().ContentType.Alias;
    }
    
  • Niels Lynggaard 192 posts 550 karma points
    Feb 16, 2014 @ 14:49
    Niels Lynggaard
    0

    Thanx mate :)

    Where does User recide now? What namespace?

  • Charles Afford 1163 posts 1709 karma points
    Feb 16, 2014 @ 17:15
    Charles Afford
    0

    Just use the .Net membership class :)  You can access all the membership information from there.  Charlie

Please Sign in or register to post replies

Write your reply to:

Draft