A final update:
I've removed if (($field->hidden) from your code and used the following:
Which made the edit profile area work as intended. Additionally, I used $allow in an if statement to wrap the entirety of the member-profile form. To preface, the goal I was attempting to accomplish was to display only the password edit fields to a specific user group and restrict the ability to change anything else. Ultimately, I used some of the great information you provided me with to conceal the entirety of the profile edit form unless you belong to a certain user group.
Many thanks, you helped me a lot and I learned some stuff on the way!
I've removed if (($field->hidden) from your code and used the following:
Code:
<?php if (($field->fieldname === 'password1' OR $field->fieldname === 'password2') AND !$allow) : ?>
Many thanks, you helped me a lot and I learned some stuff on the way!
Statistics: Posted by ralphlorem — Tue Apr 30, 2024 8:47 pm