[wp-hackers] Pluggables: wp_login -> Causing Fatal Errors
Curt Woodard
clwoodard at gmail.com
Mon Aug 20 05:47:41 GMT 2007
I've started work on replacing the WP user stuff with SMF as I'd
discussed in an earlier post. But I've come across an issue.
When I'm trying to override the wp_login() function, WP can't start
the plug-in... I'm rather baffled by this.
The code:
$smf_path = '/Path/To/SMF/';
require ($smf_path.'smf_api.php');
function wp_login($username, $password, $already_md5 = false)
{
global $wpdb, $error, $smf_user_info;
$username = sanitize_user($username);
if(!smf_authenticateUser())
{
smf_setLoginCookie(3600, addslashes($username), $password, false);
smf_loadSession();
smf_authenticateUser();
}
else
smf_authenticateUser();
//... Actual code from pluggable.php's wp_login() here
}
Pretty much, I've just added the smf_api functions. It was working
before, but now, when I attempt to override the function, it errors
out on me...
Should I just use do_action()? Or has anyone heard of a bug where an
override no longer works?
Thanks,
-Curt
More information about the wp-hackers
mailing list