• Resolved annrita22

    (@annrita22)


    My ultimate member login page keeps on blocking users with a whole page notification “You are already logged in” with two options Logout and Your Account. I wish to have “Your Account” option as something like “click here to continue”.
    The same is happening on register, “You are registered”. I want a tab or link to redirect to login page rather than the deadlock.

    How do I scrap the forms shortcodes.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @annrita22

    1. You can add a content restriction on the Login and Register pages. Please edit the Login/Register page and see UM Content Restriction. Please see this screenshot: https://drive.google.com/file/d/1luz_Y26bEwDSoTYMEtNttPCP-Fs-kfqQ/view?usp=sharing

    2. What did you mean by scrape? Could you please explain in greater detail?

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @annrita22

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

    Thread Starter annrita22

    (@annrita22)

    Hi Champ. Thanks for your response but, the pages redirect and content restriction didn’t solve my problem.
    When a user logs in then leave or closes the browser without logging out, the next time they visit the site the login page gives them the “You are already logged in” message as a whole page but not a dialouge box that one can close and resume. This also happens to the register page.
    By scrapping I meant to breakdown the login & register shortcodes to edit the links.

    I need a code that can
    1. On the user login page, Change “Your Account” to click here to continue. My users don’t need to access their account.
    2. On the user Register page, To add a link text of click here to login on “You are Already registered” to redirect to login.

    Thread Starter annrita22

    (@annrita22)

    @annrita22

    I need a code that can
    1. On the user login page, Change “Your Account” to click here to continue. My users don’t need to access their account.
    2. On the user Register page, To add a link text of click here to login on “You are Already registered” to redirect to login.

    For number 2. install the plugin “Say what?”
    https://wordpress.org/plugins/say-what/

    Plugin Settings: Add New Text Changes

    Original string: You are already registered
    Text domain: ultimate-member
    Text context:
    Replacement string: <a href="/login/">Click here to login</a>

    where /login/ is your Login Page

    Solution for 1. takes longer time to find.

    • This reply was modified 4 years, 10 months ago by missveronica.

    @annrita22

    Here is the solution for number 1.

    Create a child-theme to your current theme
    Create a subdirectory in the the child-theme: /ultimate-member/templates/
    Upload this UM Template file to this subdirectory with file name logout.php

    <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
    
    <div class="um <?php echo esc_attr( $this->get_class( $mode, $args ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
    
    	<div class="um-form">
    
    		<div class="um-misc-with-img">
    
    			<div class="um-misc-img">
    				<a href="<?php echo esc_url( um_get_core_page( 'user' ) ); ?>">
    					<?php echo um_user( 'profile_photo', 80 ); ?>
    				</a>
    			</div>
    			
    			<div><strong><?php echo esc_html( um_user( 'display_name' ) ); ?></strong></div>
    			
    			<?php
    			/**
    			 * UM hook
    			 *
    			 * @type action
    			 * @title um_logout_after_user_welcome
    			 * @description Some actions on logout form
    			 * @input_vars
    			 * [{"var":"$args","type":"array","desc":"Logout form shortcode arguments"}]
    			 * @change_log
    			 * ["Since: 2.0"]
    			 * @usage add_action( 'um_logout_after_user_welcome', 'function_name', 10, 1 );
    			 * @example
    			 * <?php
    			 * add_action( 'um_logout_after_user_welcome', 'my_logout_after_user_welcome', 10, 1 );
    			 * function my_logout_after_user_welcome( $args ) {
    			 *     // your code here
    			 * }
    			 * ?>
    			 */
    			do_action( 'um_logout_after_user_welcome', $args ); ?>
    			
    		</div>
    		
    		<ul class="um-misc-ul">
    			
    		<li>
    		<form>
     			<input type="button" value="Click here to continue" onclick="history.go(-1)">
    		</form>
    	</li>
    	<li>
    		<a href="<?php echo esc_url( add_query_arg( 'redirect_to', UM()->permalinks()->get_current_url( true ), um_get_core_page( 'logout' ) ) ); ?>">
    			<?php _e( 'Logout', 'ultimate-member' ); ?>
    		</a>
    	</li>
    		
    		</ul>
    	</div>
    </div>
    • This reply was modified 4 years, 10 months ago by missveronica.
    • This reply was modified 4 years, 10 months ago by missveronica.
    Thread Starter annrita22

    (@annrita22)

    @missveronicatv

    I appreciate your feedback. No. 1 worked well but unfortunately I don’t seen to find the logout.php sud-directory, it’s not available on parent theme hence not transferable to the child.

    @annrita22

    You must create the child-theme subdirectory where you upload the logout.php file.

    You have more documentation about “Template structure & Overriding templates via a theme” here:

    https://docs.ultimatemember.com/article/1516-templates-map

    • This reply was modified 4 years, 10 months ago by missveronica.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    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 by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

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

The topic ‘Already logged in loop’ is closed to new replies.