Copied to clipboard

Flag this post as spam?

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


  • David Amri 214 posts 740 karma points
    Jul 25, 2018 @ 06:05
    David Amri
    0

    Get all user email in backoffice with angular

    Hi,

    I have crated a custom dashboard and want to get all backoffice users email addresses. I'm able to list all users with entityResource getAll but there is no email data or user group attached to the users. Is there a way of getting all users with email and user group data with angular?

    Best regards David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 25, 2018 @ 06:34
    Jan Skovgaard
    100

    Hi David

    Not quite sure what resource to actually inject to your controller but perhaps

    • entityResource where it should be possible to get all users returned as far as I can tell by looking at the documentation for it - Have not tried using this myself for users though. So not sure exactly how much information is being returned on the user object
    • usersResource - There is a "getPagedResult" method in here but I might be blind but did not see it appearing on the documentation site I referenced above. the usersResource is listed there but I don't see all of the methods in the documentation (Or maybe I'm just being blind :)) - But anyway this method might also be interesting to explore

    I hope this helps!

    /Jan

  • David Amri 214 posts 740 karma points
    Jul 25, 2018 @ 06:42
    David Amri
    0

    Thanks Jan,

    Yes I'm able to list all the users with entityResource, but the data returned with entityResource is somewhat scarce. I'm returned with:

    • alias
    • icon
    • id
    • name

    I will look in to the usersResource thingy.

    /David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 25, 2018 @ 06:49
    Jan Skovgaard
    0

    Hi David

    Argh, sorry did not notice that you had already tried that when reading your initial post in my eager to help out :)

    /Jan

  • David Amri 214 posts 740 karma points
    Jul 25, 2018 @ 06:55
    David Amri
    0

    Awsome Jan!

    With usersResource I'm able to return much more data. Great success! :) Have a wonderful Wednesday...

    /David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 25, 2018 @ 07:04
    Jan Skovgaard
    0

    Sounds good David! :)

    Maybe the end result is even something that you would care to share once you're done?

    Happy coding!

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft