• Resolved xxaimsxx

    (@xxaimsxx)


    Hello, I am currently using an SSO plugin that detects when a user enters their email, if the domain is part of the list, they would get redirected to the SSO login page, if not, the password field will display.

    With UM’s default login form, that function does not work as far as hiding the password field and only displaying if the domain is not part of the list.

    Is there a way to the code from wp-login.php OR is there a way to just use WP’s default login page vs UM’s login page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @xxaimsxx

    You could delete the UM login page and use the defautl login page.

    Regards.

    Thread Starter xxaimsxx

    (@xxaimsxx)

    Hi @andrewshu

    I deleted it but when I go to the website, it keeps redirecting to a page not found.

    When looking at the setting, the Login page is now set to Home. Would I still need to use the redirect code to have it go back to wp-login.php?

    I have this commented out at the moment but it’s not pushing to the default wp-login.php

    // /* redirect all pages to custom login if user is logged out */
    add_action('template_redirect', function() {
    	if ( !is_user_logged_in() ) {
    		if ( !is_page('login') && !is_page('register') && !is_page('password-reset') && !is_page('email-activated') && !is_page('ext-contacts-faqs') ) {
    			wp_redirect( home_url('login') );
    			exit;
    		}
    	}
    });
    
    /* redirect default login page to custom login */
    function redirect_login() {
    	if ( basename($_SERVER['REQUEST_URI']) == 'wp-login.php' && $_SERVER['REQUEST_METHOD'] == 'GET' ) {
    		wp_redirect( home_url('login') );
    		exit;
    	}
    }
    add_action('init', 'redirect_login');
    Plugin Support andrewshu

    (@andrewshu)

    Hello @xxaimsxx

    Did you resave permalinks settings in wordpress settings?

    Regards.

    Plugin Support andrewshu

    (@andrewshu)

    Hi @xxaimsxx

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use WP default login page’ is closed to new replies.