Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter crodrigl

    (@crodrigl)

    Hi @dinhtungdu, this is a screenshot of the plugin settings as they are right now:

    View post on imgur.com

    But as soon as I put this code fragment (in a mu-plugin):

    function neb_rsa_user_restricted ($is_restricted, $wp)
    {
    $log = realpath (dirname (__FILE__)).'/rsa_log.txt';
    $user = wp_get_current_user ();

    if (!did_action ('init')) {
    $txt = "Didn't init";
    } else if ($user->exists ()) {
    $txt = "Access ok user ".$user->user_login;
    $is_restricted = false;
    } else {
    $txt = "No access.";
    }
    file_put_contents ($log, "$txt (user ID = ".$user->ID.")\n", FILE_APPEND | LOCK_EX);

    return $is_restricted;
    }
    add_filter( 'restricted_site_access_is_restricted', 'neb_rsa_user_restricted', 10, 2 );

    Then, settings page is displayed this way:

    View post on imgur.com

    Thread Starter crodrigl

    (@crodrigl)

    Well, half-solved…
    network users are now allowed to access (the login page is displayed); the problem seemed to be an old plugin interfering (More Privacy Options).

    But the strange behaviour of restricted_site_access_is_restricted filter is still present (although I don’t need it at this time).

Viewing 2 replies - 1 through 2 (of 2 total)