πŸ‡―πŸ‡΄Jordan @heshamkh

Account created on 26 July 2021, almost 3 years ago
#

Recent comments

πŸ‡―πŸ‡΄Jordan heshamkh

re-roll patch #5 against Drupal 9.5.9

πŸ‡―πŸ‡΄Jordan heshamkh

Hello @Marty2081, I faced this problem and I created a patch that should fix it
Thanks :)

πŸ‡―πŸ‡΄Jordan heshamkh

Hello, remaye
if you mean you have the user email but the user not registered yet,
yes you can .. I had a similar issue then I saw this https://www.drupal.org/node/2180227 β†’
and this is how I solve this issue

   $owner_email = $entity->field_email->value;
    $message = Message::create(['template' => 'new_user_register_for_user']);
    $message->save();
    // use this options array with the mail key if you want to send it to user who is not yet registered but you have his email
   // for contact us form or similar use case 
    $options =['mail' => $owner_email ];
    // Send a message to email directly.
    $notifier->send($message, $options);
πŸ‡―πŸ‡΄Jordan heshamkh

Hello endless_wander,
i had a similar issue then I saw this https://www.drupal.org/node/2180227 β†’
and this is how I solve this issue

   $owner_email = $entity->field_email->value;
    $message = Message::create(['template' => 'new_user_register_for_user']);
    $message->save();
    // use this options array with the mail key if you want to send it to user who is not yet registered but you have his email
   // for contact us form or similar use case 
    $options =['mail' => $owner_email ];
    // Send a message to email directly.
    $notifier->send($message, $options);
Production build 0.69.0 2024