Hot answers tagged

3

I just had to do this recently. I found the easiest thing was to build a list of the emails addresses to remove in a text file. _remove_user_emails.txt test1@test.com test2@test.com test3@test.com Then process them with the simple script below: remove_users.sh IFS=" " pwd for user in `cat _remove_user_emails.txt` do echo "Cancelling user: $...


2

A form mode is configuration which you can roll out via CMI (drush cex/cim) or install with the module by including the YAML files in the modules config folder. Implementing a new register form mode is not very intuitive. The basics: Create the form mode: /admin/structure/display-modes/form Enable and configure it like in this questions for the pre-...


2

Are you asking how to preprocess node type specific? use \Drupal\node\Entity\Node; // #### implements hook_preprocess_html() #### function yourmodule_preprocess_html(&$variables) { switch ( $variables['node']->getType() ) { // ## node-type: products ## case 'products': ... break; // ## node-type: users ## case 'users': ... break; default:...


1

Relying on the user agent is not reliable - for example I changed the user agent in my old browser, otherwise YouTube refuses to work. If, based on the results of the analysis of the violation reports, you change the CSP for such of my user agent, legitimate users of this browser may suffer. Using of script-src-attr 'unsafe-inline'; will open door for XSS ...


1

This project has Layout Builder Browser installed. After adding that block to a category, it is now an option in Layout Builder. Drupal core only seems to otherwise recognize block_content blocks.


1

I solved the problem by creating a new table as suggested by hotwebmatter. It was quite easy because i could use the structure of other field collection fields and just rename the value field. The structure looked like this: field_collection_item__field_sprechzeiten_zeitraum: table + columns bundle: varchar(128) deleted: tinyint(4) NN entity_id: ...


Only top voted, non community-wiki answers of a minimum length are eligible