User tests: Successful: Unsuccessful:
Pull Request for Issue #37128 .
fix send email when the user is created via webservices
create a new user POST {{base_path}}/api/index.php/v1/users
{
"block": "0",
"email": "apipr@mail.com",
"groups": [
"2"
],
"id": "0",
"lastResetTime": "",
"lastvisitDate": "",
"name": "apipr",
"params": {
"admin_language": "",
"admin_style": "",
"editor": "",
"helpsite": "",
"language": "",
"timezone": ""
},
"password": "qwertyqwerty123",
"password2": "qwertyqwerty123",
"registerDate": "",
"requireReset": "0",
"resetCount": "0",
"sendEmail": "1",
"username": "testAPIpr"
}
no email was sent
email sent to the created new user
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I have tested this item
Tested successfully with Postman in 4.1.1-dev of 27 February in Wampserver 3.2.7 using PHP 8.0.15. The email was sent, received of course a non-delivery message to the Super User mailbox. The response:
{"links":{"self":"http://joomla4test/api/index.php/v1/users"},"data":{"type":"users","id":"809","attributes":{"groups":{"2":2},"id":809,"name":"apipr","username":"testAPIpr","email":"apipr@mail.com","block":0,"sendEmail":1,"registerDate":"2022-02-27 10:12:07","lastvisitDate":null,"lastResetTime":null,"resetCount":0}}}
Labels |
Added:
?
?
|
I have tested this item
# Tested successfully with Postman in 4.1.1-dev of 28 February in Wampserver 3.2.7 using PHP 8.0.15. The email was sent all right.
The response:
{"links":{"self":"http://joomla4test/api/index.php/v1/users"},"data":{"type":"users","id":"811","attributes":{"groups":{"2":2},"id":811,"name":"apipr","username":"testAPIpr","email":"xxxxx@example.com","block":0,"sendEmail":1,"registerDate":"2022-02-28 08:58:38","lastvisitDate":null,"lastResetTime":null,"resetCount":0}}}
Status | Pending | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | Pending |
I have tested this item
Tested successfully - for the third time in 4.1.1-dev of 8 March in Wampserver 3.2.7 using PHP 8.0.15
The email was sent auccessfully. Response:
{"links":{"self":"http://joomla4test/api/index.php/v1/users"},"data":{"type":"users","id":"309","attributes":{"groups":{"2":2},"id":309,"name":"apipr","username":"toivo.user4","email":"admin@xxxxxx.com","block":0,"sendEmail":1,"registerDate":"2022-03-08 06:56:33","lastvisitDate":null,"lastResetTime":null,"resetCount":0}}}
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-03-11 12:48:30 |
Closed_By | ⇒ | laoneo |
Thanks!
Thank you! This tested good!
However, I have a suggestion:
"sendEmail": (0 or 1) relates to receiving admin messages (the name is a little confusing).
I think it would make sense to add a new flag for send email to users on create - so that it is optional - there could be reasons why an admin may not want to send these emails.
So creating a new json element called "sendUserWelcomeEmail": values (0 or 1)