Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

The notice "Please fill your profile" should be optional or relative to available fields #128

Open
Artmir opened this issue Oct 16, 2020 · 0 comments

Comments

@Artmir
Copy link

Artmir commented 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. :)

@Artmir 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant