clemlith
11 years agoExpert
Secured endpoint exporting all freshly registered users
Hi everyone, I need to provide a stream to partner with the following informations : Login email registration date last connection date SSO iD total of posts total of logins We plan to cre...
- 11 years ago
clemlith Do you wish to provide the access to this data outside the lithium community? if yes, then you need to handle the access on the other platform, but in case you want to put access to the endpoint data inside the community itself, then you can do following:
Once you make all the REST calls and export the users data, make a Partner_role and use the following code to access this data
<#if user.registered > <#-- if the user is not anonymous --> <#assign show_module = false /> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#-- REST call to get the user's roles --> <#if role.name?? && (role.name == "Parnter_Role")> <#assign show_module = true /> </#if> </#list> <#if show_module> <!-- the code goes here --> </#if> </#if>
I hope this helps.