• 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.

Viewing 1 replies (of 1 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin author: Can you please explain what this function does?’ is closed to new replies.