#28717 closed defect (bug) (invalid)
add_action( 'wp_login', 'my_func', 10, 2) use in multisite prevents login.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9.1 |
Component: | Login and Registration | Keywords: | reporter-feedback |
Focuses: | multisite | Cc: |
Description
The use of:
add_action( 'wp_login', 'my_func', 10, 2);
in any plugin does not work in MultiSite anymore.
Non-network admins are re-directed to the login.php and presented with the "Network Admins Only" message.
Network admin are presented with the same page however if an actual network admin refreshes the browser and resends their credentials they are redirected to the admin dashboard for the base site.
Granted I run WPMS on IIS 7.5 so it might be a compatibility issue.
Note:
add_action('wp-login', 'my_func');
does work (if you don't set the [priority] and [accepted_args], afaik).
Change History (5)
#2
follow-up:
↓ 3
@
11 years ago
- Component changed from Plugins to Login and Registration
- Keywords reporter-feedback added
Thanks for the report, Cleanshooter.
Can you provide some more details? What does your 'my_func' function do? What is the expected result?
This sounds like an issue with a plugin on your site performing a redirect when you're not expecting it to. You might be better off posting to the support forums.
#3
in reply to:
↑ 2
@
11 years ago
Replying to johnbillion:
Thanks for the report, Cleanshooter.
Can you provide some more details? What does your 'my_func' function do? What is the expected result?
This sounds like an issue with a plugin on your site performing a redirect when you're not expecting it to. You might be better off posting to the support forums.
Requested Details:
add_action( 'wp_login', array(__CLASS__, 'last_login'), 10, 2); public function last_login($user_login, $user) { //$user_report = self::__get_controller('user_report'); //$user_report->udpate_last_login($user_login, $user); }
As you can see my plugin does nothing right now as I've commented out the action to help test where the problem is. So right now I'm not expecting the action to do anything beyond still let me login.
Since I'm the plugin author and this is the only action that targets 'wp_login' and I've uninstalled all other plugins from my development environment I figure it might be a bug.
correction my testing indicates this does not work for MU plugins... not sure about regular ones.