Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 karma points
    Mar 07, 2011 @ 11:58
    Amigo
    0

    getting the umbraco admin user

    im making profile image upload on my nforum, but im having problems getting the admin user with:
    User user = new User(0);

    i need it to create the new media:

    User user = new User(0);
    Media media = Media.MakeNew(CurrentMember.MemberLoginName, MediaType.GetByAlias("image"), user, MediaParentNodeId);

    im getting the error: No node exists with id '0'

    Does anyone have an idea why?

  • Lee 1130 posts 3088 karma points
    Mar 09, 2011 @ 10:55
    Lee
    1

    Have you tried debugging it in Visual studio and make sure its not the GetByAlias thats not causing the problem

  • Amigo 243 posts 568 karma points
    Mar 09, 2011 @ 12:30
    Amigo
    0

    aaaaaa sorry Lee, it was my "MediaParentNodeId" that caused the problem...

    Have a great day ;-)

Please Sign in or register to post replies

Write your reply to:

Draft