Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 10 years ago

#4676 closed enhancement (fixed)

Resend activation key link/page

Reported by: sooskriszta's profile sooskriszta Owned by: r-a-y's profile r-a-y
Milestone: 2.0 Priority: normal
Severity: major Version: 1.0
Component: Administration Keywords: ui-feedback ux-feedback has-patch
Cc: vivek@…

Description

When a user registers as member, they are sent an account activation link. The registration confirmation page says activation key has been sent. It should also say "If you don't get the activation email within the next hour, click here to re-send it."

Attachments (6)

1-register-form.png (8.8 KB) - added by sooskriszta 10 years ago.
2-register-form-submitted.png (7.3 KB) - added by sooskriszta 10 years ago.
4676.01.patch (2.8 KB) - added by r-a-y 10 years ago.
4676.02.diff (4.4 KB) - added by imath 10 years ago.
4676.03.patch (5.0 KB) - added by r-a-y 10 years ago.
4676.04.patch (4.8 KB) - added by boonebgorges 10 years ago.

Download all attachments as: .zip

Change History (25)

#1 @DJPaul
11 years ago

  • Component changed from Members to Administration
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 1.6 to 1.0

Something like this -- perhaps an admin panel -- might be worth considering for a future release. For now, you can use Boone's Unconfirmed plugin: http://wordpress.org/extend/plugins/unconfirmed/

#2 @sooskriszta
11 years ago

Well, would be even better if the user (prospective member) can have the activation email resent to himself/herself.

#3 @sooskriszta
11 years ago

  • Cc vivek@… added
  • Severity changed from normal to major

This is kindof critical. Because if the first time around the mail isn't delivered for whatever reason, or the user deletes it by mistake, then in the current scheme of things, the user is in a bad way as BuddyPress won't allow resending of verification email and would obviously not allow re-registering with the same email...

#4 @sooskriszta
11 years ago

  • Keywords ui-feedback added

#5 @sooskriszta
11 years ago

  • Keywords ux-feedback added

#6 @sooskriszta
10 years ago

thoughts?

#8 @sooskriszta
10 years ago

#5374 is fantastic.

However, this is more along the lines that most sites operate. If you sign up and don't receive the activation email, you can have it re-sent to you without involving the site admin.

#9 @r-a-y
10 years ago

  • Milestone changed from Future Release to 2.0
  • Owner set to r-a-y
  • Status changed from new to assigned

I've always wanted to do something like this. I was thinking primarily of doing this when a non-activated user attempts to login, but I see some positives in adding it to the activation page as well.

Moving this to 2.0.

I'll do what I mentioned first, then add in the resend link afterwards.

Version 0, edited 10 years ago by r-a-y (next)

#10 @boonebgorges
10 years ago

Nice! Be sure to check out #5374, which will probably have some of the low-level functions you need for retrieving this stuff (and which, if committed, may change your details a bit)

@r-a-y
10 years ago

#11 follow-up: @r-a-y
10 years ago

  • Keywords has-patch added

01.patch is patched against trunk and adds a link to the wp-login.php page to resend the activation email when an unactivated user attempts to login.

Uses the new methods from the BP_Signup class.

To test:

  • Register a new account on the frontend, but do not activate the account
  • Attempt to login with your user account info
  • You should see this:

http://i.imgur.com/Iqx5yol.png

  • Click on the link to resend the activation email.

Give it a test and let me know what you think.

Update: This only seems to apply for single-site users. Multisite uses a different method. Will have to look into that.

Last edited 10 years ago by r-a-y (previous) (diff)

#12 in reply to: ↑ 11 @imath
10 years ago

Replying to r-a-y:

Give it a test and let me know what you think.

Update: This only seems to apply for single-site users. Multisite uses a different method. Will have to look into that.

Hi r-a-y,

Just tested, it's an interesting use of the new BP_Signup class :)

Well, since r8119, things are very similar between the two configs. For back compatibility reasons, we're still creating the user in single sites, but the Admin can choose to skip this step by defining the constant BP_SIGNUPS_SKIP_USER_CREATION to true. So i think we can first check in wpdb->signups to see if the username has not activated his account, then keep on using the user_status in case the constant is not defined and then evenutally display the link to receive the activation link.

So i've attached a new patch 4676.02.diff as a suggestion that should work on all configs.

Other than that, i may be "overthinking" the functionnality but, i thought : why a user wouldn't receive the activation email ?

  1. the email arrived in his spams
  2. he mistyped his email while signing up

So my idea about this would be : if the account is not activated redirect ("carrying" in the request the user login) the user to a form where there's only an email input field.
On submit get the user login and the email, check into the signup if the emails are equals and then resend the activation link
If no email, it means the user may have mistyped while signing up or sending this form, so we could inform him the email wasn't the one you provided while registering...

Once the email is sent, the message could be a bit more detailled like : "Activation email sent, please make sure to check your spams if not in you inbox'..

The problem is that wp-login.php might be complex to adapt, and i'm not feeling like simulating a lostpassword request to get the email form ;)

This is what i think : It's a nice feature, but there is a chance the user mistyped the email while registering and i can imagine him being very frustrated by never receiving the activation link in that case :) It would really be great if we could check this.

@imath
10 years ago

#13 @imath
10 years ago

I was thinking, what about using the login widget instead of the wp-login.php page ? this way user's would be able to eventually not use it.

#14 @r-a-y
10 years ago

Thanks for testing, imath!

I ran out of time last night to test multisite configurations. Your patch works well! I've cleaned it up a bit in 03.patch. Let me know what you think.

We might also have to figure out how other authentication plugins like WP Email Login or LDAP will work with this.

i can imagine him being very frustrated by never receiving the activation link in that case :)

I think this is a valid point. Perhaps we can add two email addresses to the signup form similar to how we have a confirm password field.

For some reference, Facebook uses two fields, as well as quite a few bulletin forum scripts like vBulletin. However, Twitter uses only one email field.

Last edited 10 years ago by r-a-y (previous) (diff)

@r-a-y
10 years ago

This ticket was mentioned in IRC in #buddypress-dev by r-a-y. View the logs.


10 years ago

#16 follow-up: @boonebgorges
10 years ago

This technique looks good to me.

I was thinking, what about using the login widget instead of the wp-login.php page ? this way user's would be able to eventually not use it.

I'm not sure I understand the question. Do you mean we should hijack WP's redirect back to wp-login.php on a failed authentication? That seems a bit outside the scope of this ticket (and it would be pretty complicated, because we'd have to figure out whether a login widget appeared on the page we planned to redirect to).

We might also have to figure out how other authentication plugins like WP Email Login or LDAP will work with this.

I took a look at a number of authentication plugins, including simple-ldap-login and wp-email-login. They all work in a similar way: hook into 'authenticate', return the $user object if it's already legitimate, otherwise run their own authn and then return either a WP_User or a WP_Error. So our technique should work smoothly with any of these setups. As a precaution, we could move our priority higher. But even that shouldn't be necessary, since in any case where we might interfere with another plugin - eg, when an LDAP plugin is auto-provisioning users - bp_core_signup_disable_inactive() will bail with return $user well before we start messing with the error message.

I think this is a valid point. Perhaps we can add two email addresses to the signup form similar to how we have a confirm password field.

I like this idea, but I don't think we have time to implement this properly for 2.0. Let's open a separate ticket for it.

4673.04.patch reworks the documentation a bit to give more focused background for developers.

#17 in reply to: ↑ 16 @imath
10 years ago

Replying to boonebgorges:

I was thinking, what about using the login widget instead of the wp-login.php page ? this way user's would be able to eventually not use it.

I'm not sure I understand the question.

I realized later it was a really bad idea ;)

This ticket was mentioned in IRC in #buddypress-dev by boonebgorges. View the logs.


10 years ago

#19 @r-a-y
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 8170:

Display a "resend email" link when an unactivated user tries to log in.

An unactivated user is a person who registers a new account, but has
not activated their account via email yet.

Previously, if an unactivated user tried to login, there was no option
for the user to resend the activation email. This commit adds this
option.

Props r-a-y, imath

Fixes #4676

Note: See TracTickets for help on using tickets.