- Issue created by @emanuelcoelho
Hi @emanuelcoelho,
I think we can check the authenticated user condition infunction autologout_page_attachments_alter(array &$attachments)
from wherefunction autologout_attach_js(array &$element, array $settings)
is called.
If you agree i will start working on it.- Merge request !73Issue #3498529: Add JS file only when user is authenticated → (Open) created by Unnamed author
Everything looks perfect.
For me it's a go.Thank you for the quick response.
Hey @emanuelcoelho,
I have tried reproducing your issue but the libraries mentioned above are not being attached for anonymous users and is only being attached for authenticated users. So, I don't think we will need any validation here. I think the validation is already present for anonymous users.
// If user is anonymous. if ($user->id() == 0) { return TRUE; }
The above validation present in the
autologout_autologout_prevent()
method is validating for anonymous users.Please provide detailed steps to replicate the issue, if I am missing something here.
I am using Drupal 11 and 2.x-dev version of the Module here. I am attaching screenshots for the reference.
Thanks !