[Plugin ZM-ajax login register]
-
Why will this plugin not pull the users info from facebook if they use facebook to login=, I think it has to do with in this code but not sure
* Maps our FB response fields to the correct user fields as found in wp_update_user. Then
* calls setUpNewFacebookUser, and passes the correct response via JSON to JS.
*
* @since 2.0.0
*
* @return JSON A JSON object
*/
public function facebook_login(){check_ajax_referer( ‘facebook-nonce’, ‘security’ );
$user = array(
‘username’ => $_POST[‘fb_response’][‘id’],
‘user_login’ => $_POST[‘fb_response’][’email’],
‘first_name’ => $_POST[‘fb_response’][‘first_name’],
‘last_name’ => $_POST[‘fb_response’][‘last_name’],
’email’ => $_POST[‘fb_response’][’email’],
‘user_url’ => $_POST[‘fb_response’][‘link’],
‘fb_id’ => $_POST[‘fb_response’][‘id’]
);if ( empty( $user[‘username’] ) ){
$status = $this->_zm_alr_helpers->status(‘invalid_username’);
$user_id = false;} else {
$user_obj = get_user_by( ‘login’, $user[‘user_login’] );
if ( $user_obj == false ){
$user_obj = $this->setupNewFacebookUser( $user );
}
- The topic ‘[Plugin ZM-ajax login register]’ is closed to new replies.