? ? ? Pending

User tests: Successful: Unsuccessful:

avatar rdeutz
rdeutz
8 May 2016

Executive summary

This new plugin allow registration of a user only with an email address. If the plugin is enabled the username field is not available in forms. As default also the name field isn’t available but this can be configured.

Backwards compatibility

Problems can occur when a template overwrite has changed one of the following views:

  • com_users/views/login/default_login.php
  • com_users/views/profile/default_core.php
  • com_users/views/registration/default.php

Same is possible for the login module.

A small problem can be if someone has a direct link to the „Username Reminder Request“ as we have in our test data. This doesn’t makes sense in this configuration.

Translation impact

Two new language files with 8 new language tags.

Core changes

  • New User Plugin Event „onUserBeforeDataValidation“
  • New User Plugin Event „onUserAfterDataValidation“
  • New JForm Class method getFieldXml as public getter for the protected method findField
  • New parameter path for the setField method of JForm, allows to add a field at a specific place in the xml tree.

All core changes are only additions and full B/C, even if the plugin isn’t accepted these changes allow more flexibility for JForm.

Testing instruction

  • Apply the patch
  • Go to extensions and discover install the new plugin
  • Enable the plugin
  • Enable user registration
  1. Test registration process
  2. Test login
  3. Test profile edit frontend
  4. Test user data change backend
avatar rdeutz rdeutz - open - 8 May 2016
avatar rdeutz rdeutz - change - 8 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2016
Labels Added: ? ? ?
avatar rdeutz rdeutz - change - 8 May 2016
Labels Added: ?
avatar rdeutz rdeutz - change - 8 May 2016
Milestone Added:
avatar brianteeman brianteeman - change - 8 May 2016
Category Authentication Language & Strings Plugins
avatar brianteeman brianteeman - change - 8 May 2016
Labels
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2016
Milestone Removed:
avatar brianteeman
brianteeman - comment - 8 May 2016

Made som en-GB suggestions inline


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

avatar smz
smz - comment - 8 May 2016

A very good idea... with a not so good name!
I find "simplify" to be a too broad concept/name: why not "emailonly"?

avatar rdeutz rdeutz - change - 9 May 2016
Milestone Added:
avatar rdeutz
rdeutz - comment - 9 May 2016

I made the suggested changes, thanks all for looking into it. I don't care so much about the name. Maybe @mikeveeckmans can make a suggestion with the marketing hat on.

avatar SharkyKZ
SharkyKZ - comment - 9 May 2016

Are you sure a plugin is the correct approach here? Wouldn't it be better off as an option in com_users?

avatar roland-d
roland-d - comment - 9 May 2016

@pe7er Are you not doing something similar?

avatar zero-24
zero-24 - comment - 9 May 2016

We need the languagetag change also for the com_joomlaupdate login view :)

avatar rdeutz
rdeutz - comment - 9 May 2016

@SharkyKZ if you do it in com_user then you would simply allow the make some fields optional, that sounds easier but it is a big change that would effect also other extensions. The plugin just copies some data and does a bit of reordering fields. I think that is the minimalistic way to achieve the goal and has (hopefully) no side effects.

@zero-24 not sure what you are talking about, I didn't made the SQL changes so that the plugin is part of the package, though before spending time on this I will make sure it goes in :-)

avatar infograf768
infograf768 - comment - 9 May 2016

hmm, a new plugin. You also have to modify the admin language/en-GB/install.xml

avatar rdeutz
rdeutz - comment - 9 May 2016

Thanks for all the notes what I have to do but if nobody tests this it will go to nowhere :-)

avatar zero-24
zero-24 - comment - 9 May 2016

@rdeutz see: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_joomlaupdate/views/upload/tmpl/captive.php

Its a login view too so it needs to be catched here too.

A test is on my todo list but it is not that easy on phone ;)

We also need to add update SQL changes and the script php. Let me know if i should send it as pull request to your branch ;)

avatar infograf768 infograf768 - test_item - 9 May 2016 - Tested unsuccessfully
avatar infograf768
infograf768 - comment - 9 May 2016

I have tested this item :red_circle: unsuccessfully on d71ee98

When the plugin is enabled, when the user is editing in back-end his profile the values of name and username are changed to the user email.


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

avatar brianteeman
brianteeman - comment - 9 May 2016

Does this needs to be in the core. There are several extensions that already do this.

avatar rdeutz
rdeutz - comment - 9 May 2016

@infograf768 that's expected behaviour. These fields aren't available, if I allow to change the username I can't really know how I should login someone.

avatar infograf768
infograf768 - comment - 9 May 2016

@rdeutz
This is not B/C at all. It broke my Super User credentials.

avatar rdeutz
rdeutz - comment - 9 May 2016

@infograf768 let me guess, username is now the same as you email, right?

@brianteeman good question, I have seen one that does it over a special register form. It is not really the same

avatar infograf768
infograf768 - comment - 9 May 2016

As I said : the Name (It was Super User) and Username (was admin) are changed to the user email

avatar rdeutz
rdeutz - comment - 9 May 2016

As I said: expected behaviour. You can't have both, register with only email/password and then login with a username

avatar infograf768
infograf768 - comment - 9 May 2016

Yes, this is why I say it is not B/C and vote against this plugin which can be enabled without the knowledge of its consequences.
It should respect existing user credentials while providing, if desired, the new type of credentials.

avatar brianteeman
brianteeman - comment - 9 May 2016

This is one on the JED. There may be more I can't really use the JED on my phone.

http://extensions.joomla.org/extensions/extension/access-a-security/site-access/email-as-username

avatar brianteeman
brianteeman - comment - 9 May 2016

Also I guess this is not suitable for any site that displays an author name. As with this plugin it would display the email address as the author.

avatar infograf768
infograf768 - comment - 9 May 2016

and not cloaked...

avatar rdeutz
rdeutz - comment - 9 May 2016

@brianteeman you can enable the name field

avatar pe7er
pe7er - comment - 9 May 2016

@roland-d Yeah, last week I was trying to write my own plugin to register with your Email address only. My reason was to lower the threshold to register at a website.

My plugin would remove the Name, Username, 2nd Email + 1st Password + 2nd Password field. Username + Password would be generated by the plugin. I noticed that some events were missing and ran into problems sending the right data in the email notification.

Having new events would make it much easier to change the registration form.

avatar rdeutz
rdeutz - comment - 9 May 2016

@pe7er I though about removing the 2nd email/password fields. I also run into some problems with JForm and the fact that the validation runs on the request data (what makes 100% sense). If you check my code you will see I added new events and called it in the models. I might split this PR into 2, one with the non plugin code changes and another with the plugin itself.

avatar bembelimen
bembelimen - comment - 9 May 2016

I don't like the fact, that com_users output looks explicit if this plugin is installed/activated. Because I have my own plugin which do something similar + split the name field. If I want to use this feature, I have to activate this plugin and override every change with my own.
Perhaps it's possible to add a more general approach

avatar Bakual
Bakual - comment - 9 May 2016

I wouldn't put such a plugin into core, but I think we should make the life easier for those who want to create such plugins.
So if it's the plugin events that are missing, lets add those and make com_users more extendible but don't necessary add an own plugin.

avatar rdeutz
rdeutz - comment - 9 May 2016

ok, let me spilt it. As long as we make these things possible I don't care if the plugin goes into core or not

avatar SharkyKZ
SharkyKZ - comment - 9 May 2016

you can enable the name field

Also consider 3rd party extensions which display usernames instead of names. I've seen many of those. Perhaps add options to customize usernames (e.g. based on IDs, randomly generated, etc.). And then use actual email for authentication.

In any case, I still think this should be a part of com_users rather than a separate plugin.

avatar rdeutz rdeutz - change - 9 May 2016
Milestone Removed:
avatar rdeutz
rdeutz - comment - 9 May 2016

Closing this one here, I have created #10350 and #10351 with the need functions to make a plugin like this.

avatar rdeutz rdeutz - change - 9 May 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-05-09 09:41:54
Closed_By rdeutz

Add a Comment

Login with GitHub to post a comment