Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Classes/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ public function finalCreate(

// send notify email to admin
if ($createAdminNotify) {
$variables['adminHash'] = HashUtility::createHashForUser($user, 'admin');

$this->sendMailService->send(
'createNotify',
StringUtility::makeEmailArray(
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/NewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function confirmCreateRequestAction(int $user, string $hash, string $stat
'userConfirmation', 'confirmUser' => $this->statusUserConfirmation($user, $hash, $status),
'userConfirmationRefused', 'confirmDeletion' => $this->statusUserConfirmationRefused($user, $hash),
'adminConfirmation', 'confirmAdmin' => $this->statusAdminConfirmation($user, $hash, $status, $backend),
'adminConfirmationRefused', 'adminConfirmationRefusedSilent', 'confirmAdminDeletion', 'confirmAdminDeletionSilent' =>
'adminConfirmationRefused', 'adminConfirmationRefusedSilent', 'confirmAdminDeletion', 'confirmAdminRefused', 'confirmAdminDeletionSilent' =>
Copy link
Contributor

@Patta Patta Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmAdminDeletionSilent must be replaced by confirmAdminRefusedSilent to make the silent admin deletion work. see:

<f:form.hidden name="status" value="confirmAdminRefusedSilent" />

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, the status confirmAdminRefusedSilent must be included in the if statement with && to prevent the email notification from being sent to the user:

if ($status !== 'adminConfirmationRefusedSilent') {

$this->statusAdminConfirmationRefused($user, $hash, $status),
default => false,
};
Expand Down Expand Up @@ -480,7 +480,7 @@ protected function createAdminConfirmationRequest(User $user)
$this->settings['new']['confirmByAdmin'] ?? '',
$this->settings['new']['email']['createAdminConfirmation']['receiver']['name']['value'] ?? ''
),
StringUtility::makeEmailArray($user->getEmail(), $user->getUsername()),
['sender@femanager.org' => 'Sender Name'],
'New Registration request',
[
'user' => $user,
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/UserBackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function confirmUserAction(int $userIdentifier): ResponseInterface

$this->eventDispatcher->dispatch(new AdminConfirmationUserEvent($user));

$jsonResult = $this->getFrontendRequestResult('adminConfirmation', $userIdentifier, $user);
$jsonResult = $this->getFrontendRequestResult('confirmAdmin', $userIdentifier, $user);

if ($jsonResult['status'] ?? false) {
$this->addFlashMessage(
Expand Down Expand Up @@ -186,7 +186,7 @@ public function refuseUserAction(int $userIdentifier): ResponseInterface

$this->eventDispatcher->dispatch(new RefuseUserEvent($user));

$jsonResult = $this->getFrontendRequestResult('adminConfirmationRefused', $userIdentifier, $user);
$jsonResult = $this->getFrontendRequestResult('confirmAdminRefused', $userIdentifier, $user);

if ($jsonResult['status'] ?? false) {
$this->addFlashMessage(
Expand Down
4 changes: 2 additions & 2 deletions Resources/Private/Templates/Email/CreateNotify.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<p>
<f:translate key="LLL:EXT:femanager/Resources/Private/Language/locallang.xlf:emailCreateAdminConfirmationText2" />
<br>
<f:link.action action="confirmCreateRequest" controller="New" absolute="1" arguments="{user:user, hash:hash, status:'adminConfirmationRefused'}">
<f:link.action action="confirmCreateRequest" controller="New" absolute="1" arguments="{user:user, hash:hash, adminHash:adminHash, status:'adminConfirmationRefused'}">
<f:translate key="LLL:EXT:femanager/Resources/Private/Language/locallang.xlf:emailCreateAdminConfirmationLinkConfirmRefused" />
</f:link.action>
</p>

<p>
<f:translate key="LLL:EXT:femanager/Resources/Private/Language/locallang.xlf:emailCreateAdminConfirmationText3" />
<br>
<f:link.action action="confirmCreateRequest" controller="New" absolute="1" arguments="{user:user, hash:hash, status:'adminConfirmationRefusedSilent'}">
<f:link.action action="confirmCreateRequest" controller="New" absolute="1" arguments="{user:user, hash:hash, adminHash:adminHash, status:'adminConfirmationRefusedSilent'}">
<f:translate key="LLL:EXT:femanager/Resources/Private/Language/locallang.xlf:emailCreateAdminConfirmationLinkConfirmRefusedSilent" />
</f:link.action>
</p>
Expand Down
Loading