| 1 | our code that initiates the sequence |
|---|
| 2 | |
|---|
| 3 | function spf_rpx_signin_user($auth_info) |
|---|
| 4 | { |
|---|
| 5 | $identifier = $auth_info['profile']['identifier']; |
|---|
| 6 | $current_user = wp_get_current_user(); |
|---|
| 7 | $wpuid = spf_rpx_get_wpuid_by_identifier($identifier); |
|---|
| 8 | |
|---|
| 9 | # if we don't have the identifier mapped to wp user, create a new one |
|---|
| 10 | if (!$wpuid) |
|---|
| 11 | { |
|---|
| 12 | $wpuid = spf_rpx_create_wp_user($auth_info); |
|---|
| 13 | } |
|---|
| 14 | |
|---|
| 15 | # sign the user in |
|---|
| 16 | wp_set_auth_cookie($wpuid, true, false); |
|---|
| 17 | wp_set_current_user($wpuid); |
|---|
| 18 | |
|---|
| 19 | # redirect them back to the page they were originally on |
|---|
| 20 | wp_redirect($_GET['goback']); |
|---|
| 21 | die(); |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | namely this code |
|---|
| 25 | |
|---|
| 26 | wp_set_current_user($wpuid);) |
|---|
| 27 | |
|---|
| 28 | after deteriming the user does exist... |
|---|
| 29 | |
|---|
| 30 | the top part of the backtrace... |
|---|
| 31 | |
|---|
| 32 | array(15) { [0]=> array(4) { ["file"]=> string(52) "C:\wamp\www\wordpress-dev\wp-includes\formatting.php" ["line"]=> int(738) ["function"]=> string(17) "wp_strip_all_tags" ["args"]=> array(1) { [0]=> object(WP_Error)#176 (2) { ["errors"]=> array(1) { ["existing_user_email"]=> array(1) { [0]=> string(41) "This email address is already registered." } } ["error_data"]=> array(0) { } } } } [1]=> array(4) { ["file"]=> string(51) "C:\wamp\www\wordpress-dev\wp-includes\pluggable.php" ["line"]=> int(200) ["function"]=> string(13) "sanitize_user" ["args"]=> array(1) { [0]=> object(WP_Error)#176 (2) { ["errors"]=> array(1) { ["existing_user_email"]=> array(1) { [0]=> string(41) "This email address is already registered." } } ["error_data"]=> array(0) { } } } } [2]=> array(4) { ["file"]=> string(51) "C:\wamp\www\wordpress-dev\wp-includes\pluggable.php" ["line"]=> int(230) ["function"]=> string(11) "get_user_by" ["args"]=> array(2) { [0]=> &string(5) "login" [1]=> object(WP_Error)#176 (2) { ["errors"]=> array(1) { ["existing_user_email"]=> array(1) { [0]=> string(41) "This email address is already registered." } } ["error_data"]=> array(0) { } } } } [3]=> array(4) { ["file"]=> string(54) "C:\wamp\www\wordpress-dev\wp-includes\capabilities.php" ["line"]=> int(489) ["function"]=> string(19) "get_userdatabylogin" ["args"]=> array(1) { [0]=> object(WP_Error)#176 (2) { ["errors"]=> array(1) { ["existing_user_email"]=> array(1) { [0]=> string(41) "This email address is already registered." } } ["error_data"]=> array(0) { } } } } [4]=> array(7) { ["file"]=> string(51) "C:\wamp\www\wordpress-dev\wp-includes\pluggable.php" ["line"]=> int(51) ["function"]=> string(7) "WP_User" ["class"]=> string(7) "WP_User" ["object"]=> object(WP_User)#69 (10) { ["data"]=> NULL ["ID"]=> int(0) ["id"]=> int(0) ["caps"]=> array(0) { } ["cap_key"]=> NULL ["roles"]=> array(0) { } ["allcaps"]=> array(0) { } ["first_name"]=> string(0) "" ["last_name"]=> string(0) "" ["filter"]=> NULL } ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> object(WP_Error)#176 (2) { ["errors"]=> array(1) { ["existing_user_email"]=> array(1) { [0]=> string(41) "This email address is already registered." } } ["error_data"]=> array(0) { } } [1]=> &string(0) "" } } [5]=> array(4) { ["file"]=> string(76) "C:\wamp\www\wordpress-dev\wp-content\plugins\simple-forum\library\sf-rpx.php" ["line"]=> int(211) ["function"]=> string(19) "wp_set_current_user" ["args"]=> array(1) { [0]=> object(WP_Error)#176 (2) { ["errors"]=> array(1) { ["existing_user_email"]=> array(1) { [0]=> string(41) "This email address is already registered." } } ["error_data"]=> array(0) { } } } } |
|---|