• Resolved carlosgv


    Hello, I would like to give permission to all users to register other users. in previous versions it could. I’ve seen the code and I think it would be to remove line 66 – 72 from includes / class-ur-ajax.php

    66 if ( is_user_logged_in() && ! current_user_can( ‘administrator’ ) ) {
    67 wp_send_json_error(
    68 array(
    69 ‘message’ => __( ‘You are already logged in.’, ‘user-registration’ ),
    70 )
    71 );
    72 }

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @carlosgv,

    If you could let me know what exactly are you looking to do then it would be easy for me to assist you.
    Let me know and I will get back to you.


    Thread Starter carlosgv


    All users can register other users. Now you get the message:
    “You are already logged in.” When a normal user completes the form.

    Hi @carlosgv,

    It does not matter whether you are logged in or not logged in. If any user has access of the registration form then they can fill in the details in the form fields and complete the form. After they hit the submit button, they will be registered.
    However, if someone has already registered with an email say(test@example.com) and tries to register again with different details but the same email then he/she will not be registered. The form will throw an error message that Email Already Exists.

    The message that you mentioned(“You are already logged in.”) occurs if you have used [user_registration_login] in the login page and trying to visit that page while you are actually logged in.

    But to achieve what you are looking to do, you can make a separate page and place the registration form shortcode there. The shortcode will display the registration form on that page. After that, it won’t matter if you are logged in or not logged in, whenever you visit that page, you will be able to fill in the details and register a new user anytime.

    I hope I have made it clear and it helps you. Let me know if I am wrong or misunderstood something and I will get back to you again.

    Merry Christmas and

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘form summit all Users’ is closed to new replies.