Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[JS] Add username/id to Loris helper object #8876

Merged
merged 1 commit into from
Oct 13, 2023

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
19 checks passed
@ridz1208 ridz1208 added this to the 26.0.0 milestone Nov 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants