Blocking Users

Hello, I cannot see any way to prevent a specific user from logging in again, and simply deleting their account will actually cause it be recreated the first time the attempt to login.

Is there a built in solution?

Answers

  • Hi,
    Which environment are you using Oneall in? (is it Wordpress...)

    Thanks.
  • Yes it is in Wordpress
  • Yes, indeed, you need something to block him.
    A hook function can block a specific user, this page (question "How to allow only logins from a specific email address?") docs.oneall.com/plugins/guide/social-login-wordpress/ has some code to work from.
    For example, in your theme functions.php add this:
    function oa_social_login_restrict_new_user_email ($user_email) { // add the black listed email addresses in the array below: if (in_array(strtolower(trim($user_email)), array('fpinel@oneall.com', 'someotheraddress')) === true) { wp_redirect(home_url()); exit; } return $user_email; } add_filter('oa_social_login_filter_new_user_email', 'oa_social_login_restrict_new_user_email');
    Regards

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.