Charakterverwalter: Einladungs-Rückmeldung unterscheidet E-Mail-Versand und Fallback

This commit is contained in:
torsten 2026-11-21 10:06:52 +01:00
parent 01dae01c7c
commit 1c1860fb5f
2 changed files with 4 additions and 2 deletions

View file

@ -388,6 +388,6 @@ function mail_invite_note(array $result): string
return match ($result['reason'] ?? '') {
'no_address' => ' Keine E-Mail-Adresse hinterlegt – Link bitte kopieren und weitergeben.',
'error' => ' E-Mail-Versand fehlgeschlagen – Link bitte kopieren und weitergeben.',
default => '',
default => ' Der E-Mail-Versand ist nicht eingerichtet – Link bitte kopieren und weitergeben.',
};
}

View file

@ -707,7 +707,9 @@ function page_admin_user_new(string $method, array $user): void
'sent' => (bool) $mail['sent'],
'to' => $mail['to'],
];
flash('success', 'Konto angelegt – Einladungslink ist bereit.' . mail_invite_note($mail));
flash('success', ($mail['sent'] ?? false) === true
? 'Konto angelegt – Einladung per E-Mail an ' . (string) $mail['to'] . ' gesendet.'
: 'Konto angelegt.' . mail_invite_note($mail));
} else {
flash('success', 'Konto für ' . $values['username'] . ' angelegt.');
}