This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Migrate MD5 password to drupal hashed password using custom migration module

I have a website in core php with 'users' table that contains simple md5 encrypted password. I want to migrate those password and convert them into drupal hash password.
For e.g. md5 pass: 89fc9bf09b4025ce28c67cb33146d61a
and after migration password will be stored like this: $S$EIMxgxYxwUxrj.uWOr9c4WSQiCvOzASdJUBhVfg8Fsa8zHitUUtq

I tried below code in .yml but thats not convert the encrypted password to drupal hash

How move in Twig behind object?

I wish customize template for private message. In template I print with kint

{{ kint(content.owner.0) }}

and I got this

content.owner.0 array(6)
→'#user' => Drupal\user\Entity\User(28)
contentsStatic class properties (14)Iterator contents (20)Available methods (154)
→protected values -> array(17)
→'uid' => array(1)
'x-default' => string(1) "1"
→'uuid' => array(1)
'name' => array(1)
'x-default' => string(6) "username"

how can I move to "name" value?

After user submits webform, "Editorial Section" appears

Hello, I am using Drupal 8 and I have noticed a new issue. When a user submits a webform on a landing page, if they go to another page and come back to the landing page, or if they click the "back to form" link after submitting the form, the "Editorial Section" appears on the page, even if the user is anonymous. Two options are available for them, "View" and "Submissions". Luckily, clicking on either of them brings the user to a 404 error, but we do not want users to be seeing the "Editorial Section" after submitting a webform, and on mobile this will be a huge hindrance.

Colons in class names are stripped, but only when the page is loaded through a controller/custom route

Hello,

Having an odd issue where colons in the a CSS class name are being stripped but only when the page is loaded through a controller/view builder.

I have applied this patch https://www.drupal.org/project/drupal/issues/3050007

Which allows me to put classes with colons through the Drupal Manage Display menu, and the classes display properly when the default page is loaded.

Drupal7: Is it possible to call an hook_menu with the POST method?

Hi,

in a custom module, I'd like to call a hook_menu using the POST method because I have to pass some data in the body of the request.

Is it possible?

What changes in its definition?

$items['/feedback'] = array( 'title' => 'Sent', 'page callback' => 'feedback_received', 'type' => MENU_LOCAL_TASK, 'access callback' => 'user_is_logged_in', );

And how can I get the data in the 'feedback_received' callback?

Thank you very much

How to override assertSameCurrency function in commerce?

In web/modules/contrib/commerce/modules/price/src/Price.php

We have

protected function assertSameCurrency(Price $first_price, Price $second_price) {
// Code
}

How to override this function in custom module?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions