How to hook into user authentication?

How to hook into user authentication?

I have a 2FA option users can enable. I am currently writing an API layer where I want to preserve this functionality. So far, I haven’t been able to hook into authentication. DrupaluserUserAuth doesn’t invoke any hook or event. Is replacing the user.auth... read more
How to hook into user authentication?

How to display selectable variations without attributes?

With Drupal Commerce 2, each of my products have multiple variations which are unique and can be adequately described by their variation title. I can not figure out how to display a dropdown for the add to cart form based the variation title alone. All that is shown... read more
How to hook into user authentication?

How to specify the correct private file path in a block

I have a Drupal site at http://example.org/xyz Per the instructions here, I have set up a private file directory outside the web root. So let’s say the web root is at /home/public_html/example/xyz The private directory is at /home/public_html/private I have that... read more
How to hook into user authentication?

Clearing cache breaks site

I’m trying to load a production site in a dev environment using the site’s codebase (core 8.3.7, contrib and custom modules and vendor folder) and the current database. After struggling a bit with it, I managed to import the DB (it’s PGSQL with a lot... read more
How to hook into user authentication?

How do I add fields to the email field contact form?

Using Drupal 7, I have a content type that uses the email field module(CCK) so that the page author can enter an email address for readers to mail them. With display suite module together with views contact form module, the saved page displays the site wide contact... read more
How to hook into user authentication?

Inline entity form complex widget not saving child entities

I’m using inline entity form on a node edit form. The target is a custom entity. There are two possible form widgets to use: Simple or Complex. With Simple (example) the child entity fields are just embedded in the parent form. It’s not possible to... read more
How to hook into user authentication?

Field and storage settings on base fields

I am rewriting my config fields (Field API fields) into base fields and I am unsure about one thing: settings. Base fields have the setSettings() method, which I presume is equivalent of field instance settings. Then, there is... read more
How to hook into user authentication?

cannot use some drush commands

I am running into some trouble with drush I can’t pm-enable the modules I just downloaded with it. I did some research but none of the solution worked for me, most cases involved switching “localhost” to “127.0.0.1” in settings.php but my... read more
How to hook into user authentication?

View filtering, Relationship Vs Contextual filter

I used contextual filters before and I know they are just like the normal filters but more dynamic, now I have this view “Sidebar Product advert block” that needs to show the product advert ( Similar to product teaser! advert is a view mode ) BUT only if... read more
Display "uncaught exception" page as content-type text/html

Display "uncaught exception" page as content-type text/html

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception. I find that the page is served as ‘Content-Type’ = ‘text/plain’, yet it contains HTML: It looks better to me when I change the code to serve as... read more
How to hook into user authentication?

domready is not defined

I’m building my own theme to be used with Angular 4 and can’t tell where/why Drupal is deciding to import jQuery. Here’s the code for my theme, loosely based off this Angular 1 theme: ng.info.yml name: ng type: theme libraries: – ng/base... read more