WordPress.org

Forums

Simple Facebook Connect
Plugin author: Can you please explain what this function does? (2 posts)

  1. Linksku.com
    Member
    Posted 3 years ago #

    add_action('wp_footer','sfc_login_check_again');
    function sfc_login_check_again() {
      wp_signon(array('user_login' => '','user_password' => '','remember' => 'forever'));
      if(is_user_logged_in()){
        if(isset($_REQUEST['redirect_to']))
          wp_redirect($_REQUEST['redirect_to']);
        else
          wp_redirect(home_url());
      }
    }

    I tried adding die('test'); to this function, but the "test" message never appeared. However, it's causing one of my pages to redirect to the homepage (the other pages are fine). The page stopped redirecting when I removed the "wp_footer()" in the page template.

    Can you explain what this function is suppose to do? It looks like it redirects the page whenever the user is logged in, but it's not.

  2. Samuel Wood (Otto)
    WordPress.org Tech Guy
    Plugin Author

    Posted 3 years ago #

    I have no idea where you got that code from, but it is not in Simple Facebook Connect. In fact, it looks dangerous. You may have been hacked.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic