Copied to clipboard

Flag this post as spam?

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


  • Aleksey Gerasimov 31 posts 95 karma points
    Sep 16, 2016 @ 16:22
    Aleksey Gerasimov
    0

    How get email of member by creator Id?

    Issue in title. I've just get an Id as:

    var cs = ApplicationContext.Current.Services.ContentService;
    var item = cs.GetById(nodeId);
    var email = item.CreatorId;
    
  • Casper 70 posts 308 karma points
    Sep 17, 2016 @ 14:31
    Casper
    101

    CreatorId is the Id of a User, not a member.

    Fetching the user email, could be done like this:

    var contentId = 0;
    var content = ApplicationContext.Services.ContentService.GetById(contentId);
    var user = ApplicationContext.Services.UserService.GetUserById(content.CreatorId);
    var userEmail = user.Email; 
    
  • Aleksey Gerasimov 31 posts 95 karma points
    Sep 19, 2016 @ 10:00
    Aleksey Gerasimov
    0

    ApplicationContext.Current.Services.UserService.GetUserById

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Sep 19, 2016 @ 07:12
    Michaël Vanbrabandt
    2

    Hi Aleksey,

    Just as a side note.

    With Umbraco we have 2 types of users:

    • User: these are the backoffice users. They can login into the backend, add changes and so on.

    • Members: these are the frontend users. They can login into your website but do not have any rights to login in the backend of your Umbraco.

    /Michaël

  • Aleksey Gerasimov 31 posts 95 karma points
    Sep 19, 2016 @ 08:58
    Aleksey Gerasimov
    0

    Sorry and thanks for note.

    I need a mail address of User

Please Sign in or register to post replies

Write your reply to:

Draft