• martinneumannat

    (@martinneumannat)


    I found out that on Multisite Networks the Registration links do not show, independently what is allowed in the network. I looked up the templates and found the problem on line 57 of the default login.php template:
    if ( get_option(‘users_can_register’) && !empty($lwa[‘registration’]) )
    The users_can_register option does not work on a Multisite network. I suggest that you create a helper function that will include the following code:

    if (
    (
    !is_multisite() && get_option(‘users_can_register’)
    ) ||
    (
    is_multisite() && in_array(get_site_option(‘registration’), [‘user’, ‘all’])
    )
    ) {
    // registrations allowed
    if (!empty($lwa[‘registration’]) && $lwa[‘registration’] == 1) return true;
    }
    return false:

Viewing 1 replies (of 1 total)
  • Thread Starter martinneumannat

    (@martinneumannat)

    I found that line 333 in login-with-ajax.php needs to change as well with the same check in order to make the AJAX call work.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.