[wp-trac] [WordPress Trac] #25793: In a multisite, get_site_option() doesn't work in login_redirect filter
WordPress Trac
noreply at wordpress.org
Thu Oct 31 23:17:37 UTC 2013
#25793: In a multisite, get_site_option() doesn't work in login_redirect filter
--------------------------+-----------------------------
Reporter: sgissinger | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Multisite | Version: 3.6.1
Severity: normal | Keywords:
--------------------------+-----------------------------
The following code fails :
{{{
function dessange_login_redirect($redirect_to, $request, $user)
{
return get_site_option(OPT_SITE_URL);
}
add_filter('login_redirect', 'dessange_login_redirect', 1, 3);
}}}
unless I connect $wpdb manually before calling get_site_option(), like in
the following code
{{{
function dessange_login_redirect($redirect_to, $request, $user)
{
global $wpdb;
$wpdb->db_connect();
return get_site_option(OPT_SITE_URL);
}
add_filter('login_redirect', 'dessange_login_redirect', 1, 3);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25793>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list