Just for the record, langcode logic to fallback to users' preferred langcode is already implemented in `_rest_password_user_mail_notify` function
function _rest_password_user_mail_notify($op, $account, $langcode = NULL) {
if ($op === 'password_reset_rest') {
if (\Drupal::config('user.settings')->get('notify.' . $op)) {
$params['account'] = $account;
$langcode = $langcode ? $langcode : $account->getPreferredLangcode(); // <- Here
....
so the langcode that `hook_mail` receives is the one the REST call received or the users' preferred one if not specified.
jherencia β changed the visibility of the branch 3470350- to hidden.
jherencia β changed the visibility of the branch 9.x to hidden.
jherencia β changed the visibility of the branch 9.x to active.
jherencia β changed the visibility of the branch 9.x to hidden.
jherencia β created an issue.
jherencia β made their first commit to this issueβs fork.