Skip to content

Conversation

@driusan
Copy link
Collaborator

@driusan driusan commented Aug 28, 2023

Currently, you can access the PHP user object from smarty templates, but if you need access the username/userid from javascript you need to jump through hoops (like putting them in a smarty template or an endpoint that returns them.)

This adds a user object of the form {username: string, id: number} to the loris helper object so that you can access the basics from javascript as loris.user.username or loris.user.id when needed.

Currently, you can access the PHP user object from smarty templates,
but if you need access the username/userid from javascript you need to
jump through hoops (like putting them in a smarty template or an endpoint
that returns them.)

This adds a `user` object of the form `{username: string, id: number}` to the
loris helper object so that you can access the basics from javascript as
`loris.user.username` or `loris.user.id` when needed.
Copy link
Collaborator

@ridz1208 ridz1208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@driusan driusan merged commit 2162de6 into aces:main Oct 13, 2023
@ridz1208 ridz1208 added this to the 26.0.0 milestone Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants