Support » Plugin: Add Link to Facebook » Found a bug in multisite login processing

  • Resolved Peidong Hu


    In function static function Facebook_login(), the code will validate if the facebook user has already registered on wordpress by running this query,
    $users = get_users(array(
    ‘meta_key’ => c_al2fb_meta_facebook_id,
    ‘meta_value’ => $me->id
    But in wordpress 3.3 and above version, ‘meta_key’ is prefixed with “blog_’blog_id’_” in usermeta table. So before running above query, c_al2fb_meta_facebook_id need to be prefixed with correct blog id.

    add following code before this query to fix it,

    //phu fix bug of multisite wrong meta facebook id
    $c_al2fb_meta_facebook_id = c_al2fb_meta_facebook_id;

    if (is_multisite()) {
    global $blog_id;
    $c_al2fb_meta_facebook_id = “blog_”.$blog_id.”_”.$c_al2fb_meta_facebook_id;
    And then use the variable $c_al2fb_meta_facebook_id to replace the constant c_al2fb_meta_facebook_id in the following queries.


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Found a bug in multisite login processing’ is closed to new replies.