• Hi Jacques,
    Do you see a problem if I use a plugin to disable users temporarily?
    https://ww.wp.xz.cn/plugins/disable-users/
    There are several out there…basically I do not want to delete/quarantine them as you have in rencontre, just disable them temporarily.

    I am trying to use this for a subscription site..if they have not paid the monthly fees, I want to disable their account (without deleting it) and when I get the payment I can enable it manually.

    One important consideration is to have a custom message-so I can tell them why their account is disabled.

    In the future maybe you can offer this inside rencontre…there are several situations where it can be used (as a milder punishment for example, blocking for some days, etc.)

    Thanks
    Sanjay

    https://ww.wp.xz.cn/plugins/rencontre/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jacques Malgrange

    (@sojahu)

    Hi Sanjay,
    no problem.

    Thread Starter Sanjay Gandhi

    (@sanjay-gandhi)

    Hi Jacques,
    It is disabling users as expected, works fine..but normal users get this message when they change things in their accounts or for new users (major conflict I guess):

    Warning: Missing argument 2 for ja_disable_users::user_login() in /home/soloscom/public_html/wp-content/plugins/disable-users/init.php on line 116

    Very strange..any ideas what is going on???

    I opened a thread on the plugin author’s support page too; if you want to follow it or comment there??
    Thanks
    Sanjay

    Thread Starter Sanjay Gandhi

    (@sanjay-gandhi)

    Hi Jacques,
    The Disable User plugin author never responded; I found out a way to display custom messages to people by userid, with that I am okay, don’t need to disable them per say. So please don’t worry about this, I have disabled the “disable this” plugin from my site (no pun intended).

    Sanjay

    Thread Starter Sanjay Gandhi

    (@sanjay-gandhi)

    For people who want to know how to display user specific messages in header (or anywhere else) here is the code (tested and works well). The userids who I want to show the message to are stored in an array. If the current user id is found in that array, the specific message is displayed.

    <?php if(is_user_logged_in())
    {
    $a = array(2, 2939, userid);
    global $user_ID;
        if (in_array($user_ID, $a, true))
        {
        echo "Message to these users";
        }
    }
    ?>

    I liked this option instead of disabling the user-because you can just put a huge block of message right at the header (and the messsage can be annoying in colors, etc) to make sure they get that that their trial period is over; instead of blanketly removing their access to the site.
    -Sanjay

    Thread Starter Sanjay Gandhi

    (@sanjay-gandhi)

    Just to be clear…the variable $a is the array of userids you want to display a specific message to:

    $a = array(2, 2939, 5555, 6666);

    is the actual array of the userids..I typed “userid” in the previous post, but to be clear, the $a is the array with all userids, all integers.

    Sanjay

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

The topic ‘Disable users temporarily’ is closed to new replies.