Does $core_v2_user.List return non-approved users? I cannot find any non-approve users, is there anyway to include them?
Does $core_v2_user.List return non-approved users? I cannot find any non-approve users, is there anyway to include them?
Unfortunately, the scripted version of this API does not expose that option - most likely inadvertently. Both the REST and in-process versions of this API do accept an AccountStatus option. I've logged this for review. As a workaround, I'd suggest trying to use either of these APIs. If it must to be server-scripted, you could wrap the in-process API with its own alternative extension (something like an alt_v2_user.List) instead of core_v2_user.List, since even core_v2_user just wraps the in-process API anyway. Thank you for bringing this forward, and apologies for the inconsistency!
Thank you for the informative answer. I will try to use the REST version to see if i can avoid a plugin which will add to the timeline of our project.
Is there any documentation on calling REST endpoints from internal JS/VM files?
I don't think that's a well documented approach, since it's typically not ideal as compared to scripted APIs if the API isn't actually remote. However, you should be able to use the core_v2_http Script API against the List User REST Endpoint.
Great, thank you for the guidance!
Hi Stephen Vicino One possible way to implement this in a widget would be to use templates and js to get the data
jQuery.telligent.evolution.get({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/roles/{roleid}/users.json', data: { 'IncludeHidden': true } }).then(function(response) { // use response });
Then use a template to render it, there are many core widgets which use this for dynamic content
template JavaScript API Module
This is a great solution! Thank you.