Some psalm fixes in the settings app
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
84de7a8d63
commit
bd8b1786c5
|
@ -73,7 +73,7 @@ class HelpController extends Controller {
|
|||
public function help(string $mode = 'user'): TemplateResponse {
|
||||
$this->navigationManager->setActiveEntry('help');
|
||||
|
||||
if (!isset($mode) || $mode !== 'admin') {
|
||||
if ($mode !== 'admin') {
|
||||
$mode = 'user';
|
||||
}
|
||||
|
||||
|
|
|
@ -172,9 +172,16 @@ class NewUserMailHelper {
|
|||
* @throws \Exception If mail could not be sent
|
||||
*/
|
||||
public function sendMail(IUser $user,
|
||||
IEMailTemplate $emailTemplate) {
|
||||
IEMailTemplate $emailTemplate): void {
|
||||
|
||||
// Be sure to never try to send to an empty e-mail
|
||||
$email = $user->getEMailAddress();
|
||||
if ($email === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = $this->mailer->createMessage();
|
||||
$message->setTo([$user->getEMailAddress() => $user->getDisplayName()]);
|
||||
$message->setTo([$email => $user->getDisplayName()]);
|
||||
$message->setFrom([$this->fromAddress => $this->themingDefaults->getName()]);
|
||||
$message->useTemplate($emailTemplate);
|
||||
$this->mailer->send($message);
|
||||
|
|
Loading…
Reference in New Issue