Results 1 to 2 of 2

Thread: Log out after user registration

  1. #1
    Thread Starter
    Veteran ajamm's Avatar
    Join Date
    Nov 2011
    Location
    New Zealand
    Posts
    309
    Thanks
    26
    Thanked 32 Times in 29 Posts

    Log out after user registration

    I am using a plugin that makes all user registrations have to be approved before they can log in.
    However I am finding that something in Classipress means that the user in logged in just once, and is directed to the new ad page.

    Can anyone advise how to modify the code, so that after the user registration is done, they user will be logged out?

    Belwo code is in theme-login, I think this is where it would be done.

    Code:
    // Show registation form
    function app_show_registration() {
    
        //Set a cookie now to see if they are supported by the browser.
        setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
        if ( SITECOOKIEPATH != COOKIEPATH )
            setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
    
    
    	global $posted;
    	
    	if ( isset($_POST['register']) && $_POST['register'] ) {
    		
                // redirect to ad creation page once they are registered
                $result = app_process_register_form(CP_ADD_NEW_URL);
    
                $errors = $result['errors'];
                $posted = $result['posted'];

  2. #2
    bbocioaca's Avatar
    Join Date
    Jul 2012
    Location
    Buzau, Romania
    Posts
    160
    Thanks
    0
    Thanked 16 Times in 15 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: November 8th, 2013, 05:37 AM
  2. [SOLVED] User Registration
    By thebsl in forum Report ClassiPress Bugs
    Replies: 8
    Last Post: January 27th, 2011, 12:51 AM
  3. User Registration Mod
    By essej88 in forum ClassiPress General Discussion
    Replies: 2
    Last Post: July 21st, 2010, 06:40 AM
  4. User Registration
    By bseaborn in forum Help Using ClassiPress
    Replies: 2
    Last Post: April 5th, 2010, 04:35 AM