Retrieve id and other fields in the front end

I need to retrieve the user id and other information and display it in the frontend.

I need a unique value for each user.

I don’t get any results doing something like this:
{{@member.id}}

Did you check our documentation? We recently added uuid to the member attributes:

1 Like

Wow great, I really needed uuid and Stripe ID.
Sorry the last time I checked I didn’t find these parameters.
Thank you

1 Like

Sorry if I write here, maybe there is no need to open a new one.

is it possible to somehow use these parameters like {{id}} and others from backend in koeing editor?

Afraid not, but can I ask what you’re trying to do? I’m sure we can work out a solution :smiley:

Sure you can ask! :slight_smile:

Paying users will use their ID and Stripe’s subscription STATUS to be able to access certain sections of my site limited with Nginx.

So I use {{id}} and {{status}} as Nginx authentication parameters.

In some pages of the site users will have to see their ID and perhaps other parameters, but since they cannot be shown using the Koeing editor, I had to create pages in this way:

page-custom-1.hbs
page-custom-2.hbs

etc

Interesting, but could you provide an example or practical use case? Are you trying to limit access to certain views or sections of your site? If so then custom templates in conjunction with {{#if access }} is the best approach. Even if it was possible inside the editor, it would be somewhat fragile. More info here:
https://ghost.org/docs/members/content-visibility/#access

Sorry I explained myself wrong, I don’t actually try to limit access to some pages of the site, but to some files in custom folders in the root of the site.

Some time ago, in another thread, I asked you if there was a way to allow access to some files only for paying users.

I solved it this way.

In short, I do something like this:

    {{#if access}}
      {{#foreach @member.subscriptions}}
           curl -u {{id}}:{{status}} https://example.com/assets/file/xxxx.xx
      {{/foreach}}
    {{/if}}

If you are interested in the subject, I am happy to talk about it in detail, in private, to fully explain the whole process of user synchronization and access to folders.

I see now. You mean this answer:

You’re relying very heavily on template code, which is best used in template files rather than in the editor :+1:

Yes, as you said, it is currently not possible to use it in the editor.
I haven’t found any other solutions at the moment.