? ? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
26 Feb 2022

Pull Request for Issue #37128 .

Summary of Changes

fix send email when the user is created via webservices

Testing Instructions

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"
}

Actual result BEFORE applying this Pull Request

no email was sent

Expected result AFTER applying this Pull Request

email sent to the created new user

avatar alikon alikon - open - 26 Feb 2022
avatar alikon alikon - change - 26 Feb 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Feb 2022
Category Front End Plugins
avatar nbradshaw45
nbradshaw45 - comment - 26 Feb 2022

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)

avatar toivo
toivo - comment - 27 Feb 2022

I have tested this item successfully on 76237c0

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}}}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37149.

avatar toivo toivo - test_item - 27 Feb 2022 - Tested successfully
avatar alikon alikon - change - 28 Feb 2022
Labels Added: ? ?
avatar toivo toivo - test_item - 28 Feb 2022 - Tested successfully
avatar toivo
toivo - comment - 28 Feb 2022

I have tested this item successfully on 585690c

# 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}}}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37149.

avatar Quy Quy - alter_testresult - 2 Mar 2022 - nbradshaw45: Tested successfully
avatar Quy Quy - change - 2 Mar 2022
Status Pending Ready to Commit
avatar wilsonge wilsonge - change - 3 Mar 2022
Status Ready to Commit Pending
avatar toivo
toivo - comment - 8 Mar 2022

I have tested this item successfully on b09c1fb

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}}}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37149.

avatar toivo toivo - test_item - 8 Mar 2022 - Tested successfully
avatar Quy
Quy - comment - 10 Mar 2022

I have tested this item successfully on b09c1fb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37149.

avatar Quy Quy - test_item - 10 Mar 2022 - Tested successfully
avatar Quy Quy - change - 10 Mar 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 10 Mar 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37149.

avatar laoneo laoneo - change - 11 Mar 2022
Labels Added: ?
avatar laoneo laoneo - change - 11 Mar 2022
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
avatar laoneo laoneo - close - 11 Mar 2022
avatar laoneo laoneo - merge - 11 Mar 2022
avatar laoneo
laoneo - comment - 11 Mar 2022

Thanks!

Add a Comment

Login with GitHub to post a comment