If you want to create an account that you can log in to with Persona, it doesn't make sense that you need to supply a password when registering.

Registering with Persona should just happen as part of the signing in procedure - there shouldn't be a "Register with Persona" button.

When Persona takes over completely, it should not be possible to reach the register page.

Persona sign in button should not be in the middle of the regular form.

Account creation should respect the "Who can register accounts?" core option and respond accordingly.

There should maybe be an option to redirect to user edit page after a new account is created.

Comments

donutdan4114’s picture

Status: Needs review » Needs work

Patch does not apply to 7.x-1.x HEAD.

jbrown’s picture

Status: Needs work » Needs review
StatusFileSize
new13.03 KB

Reroll

donutdan4114’s picture

Status: Needs review » Closed (fixed)

Added to 7.x-1.x HEAD.

jbrown’s picture

Sweet! :-)

guillaumev’s picture

Status: Closed (fixed) » Active

I'm reopening this issue because I don't agree with it. Here is the issue I'm facing: I have 2 required fields in my user registration form (first name and last name). When users register using Persona, even with the "redirect to user edit page after a new account is created" checkbox ticked, users can still register without entering their first name and last name (they sign in and then leave the user edit page and that's it).

When Persona takes over, I believe the right registration process should be the following:

1. User accesses example.com/user/register

2. The Persona popup appears and asks the user to register his email address on Persona. User signs in with Persona.

3. User fills in registration form and saves it. The email field is disabled and filled in with the email the user used to sign in with Persona.

4. User is registered in Drupal.

The user will therefore not be registered without having filled in the registration form, which is the expected behavior... Also note that this is exactly the process that happens when logging in with OpenID with no account attached to the OpenID...

guillaumev’s picture

Status: Active » Needs review
StatusFileSize
new6.14 KB

Here is a first patch that provides the process I described above.

jbrown’s picture

With Persona you can't have a special URL that the user must go to in order to create an account. With a browser-native implementation of persona there will be a button in the web browser you can click to tell the website what your email address is (sign in). This must work from any page. As soon as it happens the Drupal sign must start reporting that it is signed in with the correct email address otherwise the web browser will keep prodding it until it does.

It makes sense to sign in (prove that you own an email address) first of all and then register afterwards (add information to the user account).

I think it would make sense to have an additional role for a user once they have become "registered".

In your situation if a user is authenticated, but not registered they could be redirected to the user edit page until they successfully register.

This sort of business logic should be configurable with the Rules module.

Thoughts?

guillaumev’s picture

The main problem for me is that currently, users can sign in without registering !

In other words, if you define a field to be required in your user registration form, users can still bypass it by signing into persona and then, even if they are redirected to their "edit profile" form, they simply need to click on another link and they won't have filled in the required fields in the registration form.

pyxio’s picture

@guillaumav

I agree. This pretty important. Has it been solved? Cheers Kevin

jbrown’s picture

You can create whatever sort of registration functionality you require by creating a "Registered" role and using the Rules module.