Add Link to Facebook
[resolved] Found a bug in multisite login processing (2 posts)

  1. Peidong Hu
    Posted 2 years ago #

    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.



  2. M66B
    Posted 2 years ago #

    Thanks for this fix, it will be in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Add Link to Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.