User tests: Successful: Unsuccessful:
Code from #5556 wrapped up in a easy to test/merge Pull request
To test -
1) Set "Send Password" in User Options to YES - Register a new user - You should get an email!
2) Set "Send Password" in User Options to NO - Register a new user - You should NOT get an email!
Labels |
Added:
?
|
Rel_Number | ⇒ | 5556 | |
Relation Type | ⇒ | Pull Request for |
I was waiting for it to fail so I could fix it :)
@PhilETaylor can you add one more Tab per line so we have all agline?
Travis not liking spaces... can never work out which it should be tab...
It is because of the Joomla codestyle rules. It makes the code better to read and understand. Also you can better style
your code with tabs than with spaces.
My editor is set up for my custom code style at the moment, you should see what it did to the code when I auto rearrange/formatted :-) :-)
In phpStorm they are all tabs and all lined up right
This time I edited using github editor inline, and used tabs, lets hope once the build is complete it likes that
Is there a phpStorm Code Style definition file I can download and import?
found the link I was looking for now - thanks - https://docs.joomla.org/Joomla_CodeSniffer#Installing_Joomla_Code_style
Excellent - all passing now :)
Category | ⇒ | Authentication |
We should probably check the plugin is enabled (https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/plugin/helper.php#L126)? If not then maybe still always send the email (not sure on that latter bit)
I want to point out somethings here:
It seems the plugin "User - Joomla!" was designed to send emails to users only when these users are created from back-end of the site by administrator. So maybe the param "Notification Mail to User" should not affect the front-end registration?
If we want to allow disable sending emails to users in front-end registration, maybe introduce a new parameter to Users component options, same as "Notification Mail to Administrators" param which we are having right now ?
If we decide to go with this change, maybe we should change the tooltip of the parameter "Notification Mail to User", too. Right now, it is "When an administrator creates a user account, this determines if an email, which contains their username and password, is sent to the user.", so it will be invalid with this change
Yep, a bit confused here. The Joomla User plugin param "Notification Mail to User" is explicitely set to be used when a user is created from the back-end, never from the frontend.
Why change this? To prevent automatic registration in frontend, just set "New User Account Activation" to admin.
The change proposed would not be B/C and is useless imho.
Yep, a bit confused here. The Joomla User plugin param "Notification Mail to User" is explicitely set to be used when a user is created from the back-end, never from the frontend.
er this is quite obviously not the case, because if you enable that, and then create a user using the frontend registration form, you get an email with your plaintext user/pass in it!
@PhilETaylor
This should depend on the parameters set in the com_users Options.
A mail will always be sent, and this is expected. But its content depends on the options.
Setting Send Password to No and New User Account Activation to None, I will get this mail:
If I set Send Password to No and New User Account Activation to Self, I will get:
etc.
@test success
BUT .... there is a minor bug here registration.php, line 510:
if (json_decode(JPluginHelper::getPlugin('user', 'joomla')->params)->mail_to_user)
"User - joomla" plugin is enabled, and mail_to_user is FALSE. Mails are not sent until the plugin saved at least once.
@infograf768 I think this should be fixed in SQL installation scripts ... initializing with same value than displayed in the xml configuraiton.
Folks, I am closing this one as the basic implementation is correct.
If any bug (in sql or other) please create a new PR.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-16 08:24:39 |
@PhilETaylor
can you make travis happy?
https://travis-ci.org/joomla/joomla-cms/jobs/45735524