You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that this should be optional and relative to empty-fields rather than hardcoded for the specific fields. For GDPR purposes we are rarely interested in the 'gender' or 'age' of users so naturally even though we disable those fields in user profile form and display the drupal notice persists.
// Check if any of user field empty, if so set a remind message. if (($user->get('field_age_group')->isEmpty() || $user->get('field_gender')->isEmpty()) && ($current_route !== 'entity.user.edit_form' && $current_route !== 'openideal_user.register.user.more_about_you') && !$user->hasRole('administrator')) { \Drupal::messenger()->addMessage(t('Please fill your <a href="@link">profile</a>', ['@link' => Url::fromRoute('entity.user.edit_form', ['user' => $user_id])->toString()] )); }
For now I have edited those but these should be flexible. The logic behind this is that optional fields unless marked mandatory, should remain optional to the user's choosing to or not to disclose that information.
(Edit) I can see that users can select "prefer not to say". This is a workaround to the issue, however if some project doesn't want to use the gender and age fields, then it should be possible to have the alert removed. Or better to make the alert tie "any" empty fields. But then again the issue of free choice comes to mind. :)
The text was updated successfully, but these errors were encountered:
Artmir
changed the title
the notice "PLeae fill your profile" should be optional or relative to available fields
the notice "Please fill your profile" should be optional or relative to available fields
Oct 16, 2020
Artmir
changed the title
the notice "Please fill your profile" should be optional or relative to available fields
The notice "Please fill your profile" should be optional or relative to available fields
Oct 16, 2020
I see that this should be optional and relative to empty-fields rather than hardcoded for the specific fields. For GDPR purposes we are rarely interested in the 'gender' or 'age' of users so naturally even though we disable those fields in user profile form and display the drupal notice persists.
// Check if any of user field empty, if so set a remind message. if (($user->get('field_age_group')->isEmpty() || $user->get('field_gender')->isEmpty()) && ($current_route !== 'entity.user.edit_form' && $current_route !== 'openideal_user.register.user.more_about_you') && !$user->hasRole('administrator')) { \Drupal::messenger()->addMessage(t('Please fill your <a href="@link">profile</a>', ['@link' => Url::fromRoute('entity.user.edit_form', ['user' => $user_id])->toString()] )); }
For now I have edited those but these should be flexible. The logic behind this is that optional fields unless marked mandatory, should remain optional to the user's choosing to or not to disclose that information.
(Edit) I can see that users can select "prefer not to say". This is a workaround to the issue, however if some project doesn't want to use the gender and age fields, then it should be possible to have the alert removed. Or better to make the alert tie "any" empty fields. But then again the issue of free choice comes to mind. :)
The text was updated successfully, but these errors were encountered: