{"id":902,"date":"2018-03-13T21:18:59","date_gmt":"2018-03-14T05:18:59","guid":{"rendered":"http:\/\/blackbirdsolutions.com\/?p=902"},"modified":"2018-03-13T21:18:59","modified_gmt":"2018-03-14T05:18:59","slug":"getting-a-list-of-all-users","status":"publish","type":"post","link":"https:\/\/blackbirdsolutions.com\/?p=902","title":{"rendered":"Getting a List of All Users"},"content":{"rendered":"<p>The MEL function to get lists of users takes, as a parameter, a list of locations of care.\u00a0 However, what if you are writing code where you want <strong>all<\/strong> the users and don&#8217;t know what locations are in the system where the code will be running?<\/p>\n<p>The answer is that you can get the root location and pass that into the function.<\/p>\n<pre>{GET_USER_LIST(find('AllLocation', 'ABBREVNAME', 'LOCID', 0),\"\",\"Delimited\",true)}<\/pre>\n<p>Note! the last parameter above is undocumented. It filters out the roles for each user in the result list.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The MEL function to get lists of users takes, as a parameter, a list of locations of care.\u00a0 However, what if you are writing code where you want all the users and don&#8217;t know what locations are in the system where the code will be running? The answer is that you can get the root [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[],"class_list":["post-902","post","type-post","status-publish","format-standard","hentry","category-cps","category-mel-tricks"],"_links":{"self":[{"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=\/wp\/v2\/posts\/902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=902"}],"version-history":[{"count":2,"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":904,"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions\/904"}],"wp:attachment":[{"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blackbirdsolutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}