stable
Clone or download
During refactoring of register.php, `send_new_user_email()` behavior has been copied into AfterSuccessfulUserRegistration but the function has been left as is in proj_email.php because it was still used in approve_pending_users.php. In order to not duplicate too much the behavior, the function is now part of a dedicated object with a naming that should be closer to the intent: `sendConfirmationHashEmail()`. This will help future refactoring of approve_pending_users.php when we will extract its content in dedicated object without having to depend on legacy function like `send_new_user_email`. To be consistent, `sendLoginByMailToUser()` is also extracted in a dedicated object. This decreases a little bit the responsibilities of AfterSuccessfulUserRegistration. No functional changes in user registration or in pending users approval regarding email sending. Part of request #29614: Invited users shouldn't be mandated to re-confirm their email Change-Id: Iac837801db76b99c85b6473ea7895901676a23a1
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/Request/RouteCollector.php | +10 | −3 | Go to diff View file |
M | src/common/User/Account/Register/AfterSuccessfulUserRegistration.php | +4 | −34 | Go to diff View file |
A | src/common/User/Account/Register/ConfirmationHashEmailSender.php | +46 | −0 | Go to diff View file |
A | src/common/User/Account/Register/NewUserByAdminEmailSender.php | +46 | −0 | Go to diff View file |
M | src/www/admin/approve_pending_users.php | +30 | −2 | Go to diff View file |
M | src/www/include/proj_email.php | +0 | −12 | Go to diff View file |
M | tests/unit/common/User/Account/Register/AfterSuccessfulUserRegistrationTest.php | +40 | −15 | Go to diff View file |