New answers tagged

3 votes

Replacement for hook_user_presave() for saving values captured in the user form to the user profile

As pointed out from @cilefen, the $edit parameter has been removed from the parameter passed to hook_user_presave(), which (starting from Drupal 8) is now documented under hook_ENTITY_TYPE_presave(). $...
  • 94.9k
0 votes

How can I encrypt user-submitted content per user for a content type?

So ultimately I decided on implementing a less-secure but "better than nothing" approach. I evaluated the Field Encrypt module but it can only use a single key to encrypt all fields, and I ...
2 votes
Accepted

How do I display user signatures in comments?

git log -Spersonalization led me to https://www.drupal.org/node/1548204, which leads to https://www.drupal.org/project/signature and https://www.drupal.org/node/2457545. So, this feature was moved to ...
  • 3,643
0 votes

Column of owner of webform submission in database

found it, it was uid in webform_submission_data table. I couldnt find it, because it was hidden from phpmyadmin
-1 votes

How can I prevent Drupal from saving the user's initial email address? (init in the users_field_data table)?

Looking into this, the initial email is only collected automatically if the user registers using the registration form; decoupled registrations do not have init set. I know the general recommendation ...
1 vote

How do I list all the roles to assign them in the registration form?

You can add an entity reference field to the user, referencing entities of type User Role. You can do this by enabling the Field UI module, and navigating to Admin -> Configuration -> People -&...
  • 15.3k
0 votes

"Unable to remove item at non-existing index"

I had a similar problem, but it was also appearing when you try to save the user. Have you tried editing and saving those users with the error? In my case we have two multi-value paragraph fields that ...
  • 1
0 votes

How to load a customer profile from address module

customer profile is a entity type and can be loaded by profile_id by using the entityTypeManager() $entity_manager = \Drupal::entityTypeManager(); $profile = $entity_manager->getStorage('profile')-&...
1 vote

how can I add contextual links to each of the items in my view?

Rendering the links is only one half of the equation. Contextual links are positioned absolutely. The easiest solution is to make sure that each item has the contextual-region class on it's wrapper. I ...
  • 7,212
0 votes

No results because of relationships, unless "Bypass content access control" is selected

In my case, on Drupal 9, it was a matter of editing the view for the search, specifically the query options. In the edit interface for your view, click the Advanced link to open up the advanced ...

Top 50 recent answers are included