WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 2 months ago

#12582 closed enhancement (wontfix)

user_registered action suggestion

Reported by: roxaz Owned by: westi
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: Plugins Keywords: needs-patch
Focuses: Cc:

Description

I am developing theme that should include user login / registration (so we dont have to see wp-login.php ever again).

Now for login it was easy - with the help wp_login_url user is redirected back to whatever page we need after login.

To achieve same thing for registration i added new action in wp-login.php

$errors = register_new_user($user_login, $user_email);
do_action('user_registered', array($user_login, $user_email, $errors));

using this action now i can make wp-login.php redirect user to main page and display errors there.

Maybe this could be included in wordpress? Or maybe wp_login_url type function that can redirect user wherever needed? I would personally go with action as it gives much more freedom.

Change History (5)

comment:1 nacin4 years ago

Does [13465] take care of this?

comment:2 roxaz4 years ago

okay redirecting part - sure, but what about errors then? if there are errors user will not see them and page will seem to only reload. same goes for login redirection too.

comment:3 nacin4 years ago

  • Milestone changed from Unassigned to Future Release

comment:4 nacin4 years ago

  • Keywords needs-patch added; action user_registered removed

comment:5 nacin2 months ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

There appear to be enough filters in register_new_user() to handle this.

Note: See TracTickets for help on using tickets.