Add a <previous> option to the 'Redirect path on Registration' setting

mikejoconnor - December 22, 2007 - 18:35
Project:LoginToboggan
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

This patch adds two additional features to the LoginToboggan module

1. It allows you to hide the username field on the registration page, and automatically populate it with the users email address.

2. You can enter <previous> in the Redirect path on Registration: field, and it will send you to the referring page once the registration process is complete.

I'm happy to make any improvements necessary to have this incorporated into the LoginToboggan module. I look forward to hearing your suggestions.

Mike O.

AttachmentSize
logintoboggan.patch4.94 KB

#1

hunmonk - December 23, 2007 - 18:29
Version:5.x-1.0» 5.x-1.x-dev
Status:needs review» needs work

this patch doesn't sufficiently address the implementation issues at hand:

  1. the username should be modified using form_set_value(), most likely in the validate stage. using #post like that is a hack. same for the redirect stuff -- it needs to be handled more elegantly.
  2. the variable you're adding ('email_as_username') does not use the same naming convention as the rest of LT's variables.
  3. looks like there might be a missing space in the description text for the redirect setting.
  4. since the username field is required, we might need to pre-populate it in form_alter w/ a default value, to avoid problems with the element validation.
  5. none of the labeling for the username field on the login forms are addressed. ie, the login form should probably display 'Email' instead of 'Username' when this feature is enabled.
  6. i don't think this setting will play very well with the 'Login with username or e-mail' setting, since i believe it prevents people using email addys as usernames. we'd probably have to make it a radio option for one or the other.
  7. it's a security issue to copy the user's email address to their username w/o their consent, since the username is displayed in posts, etc. we'd need a way to address that.
  8. you've got two features in one patch here. please separate them out, and create another issue for the second feature.

#2

mikejoconnor - December 27, 2007 - 03:25

Thanks for the feedback, I'll work on addressing those issues.

#3

claudiu.cristea - March 15, 2008 - 09:29
Title:Patch for registration redirection, and username fields» Hide username at registration

I'm very interested in this feature, especially on using only the e-mail address when registering or login. First I want to make some notes on hunmonk comments:

  1. you've got two features in one patch here. please separate them out, and create another issue for the second feature.

True. I think the first feature is the most important so I change the title of the issue to reflect this.

Points: 1, 2, 3, 4, 5 from http://drupal.org/node/203275#comment-668450 are not critical. They can be solved. No other comments on this stage...

  1. i don't think this setting will play very well with the 'Login with username or e-mail' setting, since i believe it prevents people using email addys as usernames. we'd probably have to make it a radio option for one or the other.

My proposal is to add a new radio button to login_with_mail element as in the attached image

  1. it's a security issue to copy the user's email address to their username w/o their consent, since the username is displayed in posts, etc. we'd need a way to address that.

I think that this is the biggest challenge of this feature! In which cases would site administrator using only e-mail (and not username)? I think that in most cases when there is a mandatory Full name or First name and Last name in the user profile. In this case they can display the full name and hide the e-mail address. This can be achieved through theming. In this case the hunmonk concern has a solution. But applying this patch to the module will let uncover those sites where there are no other profile fields alternatives to username. And this is a real security issue...

We have some options here:

  1. Extracting the "user part" from the e-mail address. For example joe@example.com (as e-mail) will became joe (as username). Of course we must treat the eventuality of duplicate names. Hmmm... Number suffix? Or user interaction?
  2. Replacing "@" sign. joe-at-example.com, joe_example.com, joe-example.com. Anyway... It's not very hard for an e-mail harvester to exploit this workaround.

I think that the discussion must go on... It's a useful feature. Why using 2 unique IDs (e-mail & username)?

AttachmentSize
login_mode.png 35.36 KB

#4

kenorb - October 14, 2008 - 09:10

#5

hunmonk - October 16, 2009 - 15:01
Title:Hide username at registration» Add a <previous> option to the 'Redirect path on Registration' setting
Version:5.x-1.x-dev» 7.x-1.x-dev

i will consider the inclusion of a <previous> setting in the 'Redirect path on Registration' for 7.x, but i will not consider any modification that deals with e-mail only registration -- it's a rats nest i have no interest in pursuing. look to another module, or lobby to get that feature in a future version of core... ;)

changing the title to reflect the new focus.

 
 

Drupal is a registered trademark of Dries Buytaert.