Forum Discussion

matthieul's avatar
6 years ago

Display metrics registered users count for anonymous user

Hello!

I have a page for user that are not yet signed id or registered to my community, on which some metrics are displayed : fully registered users count, posts count and online user 

For information, anonymous users are not allowed, every user should be register to be able to access the community and its content, and I can not allow or able it.

For now, the posts count and online user are displayed correctly, but I can not seem to find a way to retrieve fully registered users count.
`rest("2.0","/search?q=" + 'SELECT * FROM metrics WHERE id="completed_registrations"'?url).data.items[0]["value"] ` and `rest("2.0","/search?q=" + 'SELECT count(*) FROM users"'?url).data` also give me a forbidden error.

What can I do to just to display in my custom component the number of fully registered user?
Thanks