in2code-de / femanager

Modern TYPO3 Frontend User RegistrationTYPO3 Frontend User Registration and Management based on Extbase and Fluid and on TYPO3 8 and the possibility to extend it to your needs. Extension basicly works like sr_feuser_register
https://www.in2code.de/agentur/typo3-extensions/femanager/
48 stars 118 forks source link

missing email AdminNotify after editing of user profile #494

Open ulrike-cosmoblonde opened 1 year ago

ulrike-cosmoblonde commented 1 year ago

This issue is related to #472

In my example I experienced the problem for the "edit" function. The notifyAdmin is not working due to the changes in: public/typo3conf/ext/femanager/Classes/Controller/AbstractController.php => updateAllConfirmed and in public/typo3conf/ext/femanager/Classes/Utility/ConfigurationUtility.php

The following problems exist:

  1. In both files the string 'edit/email/createUserNotify/notifyAdmin/receiver/email/value' should be changed into: 'edit/email/createUserNotify/notifyAdmin/receiver/email/value' I believe the /createUserNotify/ part was falsly added.

  2. The function ConfigurationUtility::notifyAdminAboutEdits should have an OR condition instead of an AND condition

    if (self::getValue(
            'edit/notifyAdmin',
            $config
        ) && self::getValue(
            'edit/email/createUserNotify/notifyAdmin/receiver/email/value',
            $config
        )) {
            return true;
        }
  3. The function updateAllConfirmed in the AbstractController is missing a 2nd parameter in the ConfigurationUtility::getValue function calls

    ConfigurationUtility::getValue('edit/email/createUserNotify/notifyAdmin/receiver/email/value') ??
    ConfigurationUtility::getValue('edit/notifyAdmin'),

With those 3 adjustments the notifyAdmin should work as expected for updates.

Regards! Ulrike

chludwig commented 1 year ago

I think this is already fixed with https://github.com/in2code-de/femanager/pull/480/files

ulrike-cosmoblonde commented 1 year ago

By looking at the fix I can only see my 2nd suggested change implemented (changing the && into an ||). But my 1st and 3rd remarks are not implemented. As far as I can see, the string 'edit/email/createUserNotify/notifyAdmin/receiver/email/value' is not valid as the 'createUserNotify' should not be contained and the getValue function is still missing a 2nd parameter which is required.

chludwig commented 1 year ago

You're right please have a look at https://github.com/in2code-de/femanager/pull/496 and confirm if your tests were successful.