Hi everyone,
I’m trying to restrict the image library in BackdropCMS so that when a user selects a profile picture, they can only choose images from public://avatars/
.
I managed to achieve this by adding a filter in the perfil_image_library view, but this change affects other content types that also use the image browser.
What I need is:
-
In the user profile form, users should only be able to select images from
public://avatars/
. - In other forms, the image library should work without restrictions.
I’ve tried modifying the user_picture_field
module using hook_views_query_alter()
, but it hasn’t worked as expected. I also attempted using hook_form_alter()
, but it still affects other parts of the site.
What would be the best way to restrict the image library only when selecting a user profile picture, without impacting other forms?
Thanks in advance for any suggestions!
Recent comments
For those perhaps like me, not all that familiar with Backdrop, I'll post my progress here, with my understanding of what works. I set up a local site, with two languages English...
How to translate my site content
After running Update again, I get: content_access_node_access_rebuild still does not exist. schema version for that row is 7103. Yes, the version is 1.x-1.3.1. So with...
content_access_node_access_rebuild doesn't exist
Hi patch-works. Thanks for posting the images. I've tried recreating the scenario, and have not encountered any issues when creating a new user account. I'm confused about one point...
Issue - Cannot create new user - "You cannot enter a title without a link url."
Hello Argiepiano, Thank you for looking into this. There are 3 links fields, this one is the most recent, here are the screenshots: https://app.box.com/s/...
Issue - Cannot create new user - "You cannot enter a title without a link url."
Glad to see this was resolved, and that the cause was not a bug! Gotta love this community!
View/Edit tabs missing