It would be helpful to add automatic email to users on patron creation when that creation has been triggered by LDAP or Shibboleth creations.
Created attachment 134272 [details] [review] Bug 30646: Add welcome email support to LDAP This patch adds the ability to enable the welcome email notice for new users added via the LDAP replicate option. Test plan 1) Configure LDAP for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your ldap config block 3) Confirm you have replicate enabled for your LDAP config 4) Attempt to login with an entirely new user to Koha using the LDAP connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user.
Created attachment 134279 [details] [review] Bug 30646: Add welcome email support to SAML2 This patch adds the ability to enable the welcome email notice for new users added via the Shibboleth autocreate option. Test plan 1) Configure Shibboleth for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your shibboleth config block 3) Confirm you have autocreate enabled for your Shibboleth config 4) Attempt to login with an entirely new user to Koha using the shibboleth connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user.
Created attachment 136171 [details] [review] Bug 30646: Add welcome email support to LDAP This patch adds the ability to enable the welcome email notice for new users added via the LDAP replicate option. Test plan 1) Configure LDAP for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your ldap config block 3) Confirm you have replicate enabled for your LDAP config 4) Attempt to login with an entirely new user to Koha using the LDAP connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user.
Created attachment 136172 [details] [review] Bug 30646: Add welcome email support to SAML2 This patch adds the ability to enable the welcome email notice for new users added via the Shibboleth autocreate option. Test plan 1) Configure Shibboleth for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your shibboleth config block 3) Confirm you have autocreate enabled for your Shibboleth config 4) Attempt to login with an entirely new user to Koha using the shibboleth connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user.
Created attachment 136173 [details] [review] Bug 30646: (follow-up) Set to send immediately Other welcome notices send immediately rather than waiting on the queue to be processed.. these one's should too.
Created attachment 138708 [details] [review] Bug 30646: Add welcome email support to LDAP This patch adds the ability to enable the welcome email notice for new users added via the LDAP replicate option. Test plan 1) Configure LDAP for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your ldap config block 3) Confirm you have replicate enabled for your LDAP config 4) Attempt to login with an entirely new user to Koha using the LDAP connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 138709 [details] [review] Bug 30646: Add welcome email support to SAML2 This patch adds the ability to enable the welcome email notice for new users added via the Shibboleth autocreate option. Test plan 1) Configure Shibboleth for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your shibboleth config block 3) Confirm you have autocreate enabled for your Shibboleth config 4) Attempt to login with an entirely new user to Koha using the shibboleth connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 138710 [details] [review] Bug 30646: (follow-up) Set to send immediately Other welcome notices send immediately rather than waiting on the queue to be processed.. these one's should too. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Hmm.. we now have this running in production.. May I convert your SO to a QA and add our customers name as an SO Kyle?
This all looks good, but we need tests: - Mocked test on GetPreparedLetter being called and then EnqueueLetter as well - Mocked test on SendQueuedMessages being called with the right parameter - Not super picky about it, but $patron->notice_email_address should also be tested. Can try helping, but not today.
Created attachment 141117 [details] [review] Bug 30646: Add welcome email support to LDAP This patch adds the ability to enable the welcome email notice for new users added via the LDAP replicate option. Test plan 1) Configure LDAP for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your ldap config block 3) Confirm you have replicate enabled for your LDAP config 4) Attempt to login with an entirely new user to Koha using the LDAP connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 141118 [details] [review] Bug 30646: Add welcome email support to SAML2 This patch adds the ability to enable the welcome email notice for new users added via the Shibboleth autocreate option. Test plan 1) Configure Shibboleth for authentication 2) Enable the welcome email by adding '<welcome>1</welcome>' to your shibboleth config block 3) Confirm you have autocreate enabled for your Shibboleth config 4) Attempt to login with an entirely new user to Koha using the shibboleth connection (with a user who has a valid email address mapped to Koha borrower fields) 5) Confirm the email is sent by looking at the notices for the new user. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 141119 [details] [review] Bug 30646: (follow-up) Set to send immediately Other welcome notices send immediately rather than waiting on the queue to be processed.. these one's should too. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 141120 [details] [review] Bug 30646: Unit test for Auth_with_shibboleth This patch adds a unit test for the Auth_with_shibboleth welcome notice addition.
Created attachment 141121 [details] [review] Bug 30646: Unit tests for Auth_with_ldap This patch adds a unit test to the Auth_with_ldap.t to confirm welcome notices are send when replace + welcome are enabled in the configuration. We also add a snippet to hide 'Subroutine redefined' warnings in this test as it makes the test output rather challenging to read and the way the test is written these warning are expected.
One day I'll get around to re-writing/re-factoring those tests.. they're a nightmare to work on. Anywho, tests now submitted, apologies for being bad and not submitting earlier :(. Note.. I snuck in a snippet to quiten the plethora of warning that the Auth_with_ldap.t test was throwing.. it's well documented in the top of the test now and makes the test output sooooo much more readable.
Pushed to master for 22.11. Nice work everyone, thanks!