Skip to content

Admin confirmation mail can be confirmed by the user #108

Open
@SicorDev

Description

@SicorDev

The default sender address for the admin confirmation mail is the user mail address. If the domain of this email uses SPF in "Fail" mode, the mail will be rejected and a non delivery notification is sent to the user.

Now the user can confirm the admin mail himself.

protected function createAdminConfirmationRequest(User $user)
{
$aacService = $this->objectManager->get(
AutoAdminConfirmationService::class,
$user,
$this->settings,
$this->contentObject
);
if ($aacService->isAutoAdminConfirmationFullfilled()) {
$user->setDisable(false);
$this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__ . 'AutoConfirmation', [$user, $this]);
$this->createAllConfirmed($user);
} else {
$this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__ . 'ManualConfirmation', [$user, $this]);
$this->sendMailService->send(
'createAdminConfirmation',
StringUtility::makeEmailArray(
$this->settings['new']['confirmByAdmin'],
$this->settings['new']['email']['createAdminConfirmation']['receiver']['name']['value']
),
StringUtility::makeEmailArray($user->getEmail(), $user->getUsername()),
'New Registration request',
[
'user' => $user,
'hash' => HashUtility::createHashForUser($user)
],
$this->config['new.']['email.']['createAdminConfirmation.']
);
$this->addFlashMessage(LocalizationUtility::translate('createRequestWaitingForAdminConfirm'));
}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions