Exemple #1
0
 public function checkPurchaseForm()
 {
     $errors = new \WP_Error();
     $title = __('Check Purchase Key', 'marketcheck');
     $purchaseKey = $this->getPurchaseKey();
     $selectedMarket = $this->getSelectedMarket();
     $isSubmited = $this->getPostVar('marketcheck-submitted');
     if ($isSubmited) {
         if (!$selectedMarket) {
             $errors->add('invalid-market', __('<strong>Error</strong>: Invalid Market Selected.', 'marketcheck'));
         }
         if (!$purchaseKey) {
             $errors->add('empty_purchase', __('<strong>Error</strong>: Empty Purchase Code.', 'marketcheck'));
         }
     }
     if ($isSubmited && $selectedMarket && $purchaseKey) {
         $this->getCurrentMarket()->setPurchaseKey($purchaseKey);
         $isValidPurchase = $this->getCurrentMarket()->isValidPurchase();
         if (is_wp_error($isValidPurchase)) {
             $errors = $isValidPurchase;
         } else {
             return;
         }
     }
     login_header($title, '<p class="message register">' . $title, $errors);
     $this->showPreRegisterForm();
     login_footer('purchase-key');
     die;
 }
 public function Disallow_lost_password()
 {
     // The blogname option is escaped with esc_html on the way into the database in sanitize_option
     // we want to reverse this for the plain text arena of emails.
     $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
     login_header(__('Password reset disabled', c_bid_text_domain), '<p class="message">' . sprintf(__('%s uses Mozilla Persona to sign in and does not use passwords. Password reset is disabled.', c_bid_text_domain), $blogname) . "</p>");
     login_footer('user_login');
     exit;
 }
function wpcom_vip_login_limit_dont_show_login_form()
{
    if ('post' != strtolower($_SERVER['REQUEST_METHOD']) || !isset($_POST['log'])) {
        return;
    }
    $username = sanitize_user($_POST['log']);
    if ($error = wpcom_vip_login_is_limited($username)) {
        login_header(__('Error'), '', $error);
        login_footer();
        exit;
    }
}
Exemple #4
0
<?php 
        if (!$error) {
            ?>
wp_attempt_focus();
<?php 
        }
        ?>
if(typeof wpOnload=='function')wpOnload();
<?php 
        if ($interim_login) {
            ?>
(function(){
try {
	var i, links = document.getElementsByTagName('a');
	for ( i in links ) {
		if ( links[i].href )
			links[i].target = '_blank';
	}
} catch(e){}
}());
<?php 
        }
        ?>
</script>

<?php 
        login_footer();
        break;
}
// end action switch
Exemple #5
0
        </p>

        <input type="hidden" name="xf_user[username]" value="<?php 
echo esc_attr($xfUser['username']);
?>
"/>
        <input type="hidden" name="refresh_token" value="<?php 
echo esc_attr($refreshToken);
?>
"/>
        <input type="hidden" name="scope" value="<?php 
echo esc_attr($scope);
?>
"/>
        <input type="hidden" name="redirect_to" value="<?php 
echo esc_attr($redirectTo);
?>
"/>

        <p class="submit">
            <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large"
                   value="<?php 
esc_attr_e('Associate Account', 'xenforo-api-consumer');
?>
"/>
        </p>
    </form>

<?php 
login_footer('user_login');
function px_verify_view_registration_form($errors = '', $verified = array())
{
    login_header(__('Registration Form'), '<p class="message register">' . __('Register An Account') . '</p>', $errors);
    if ($verified) {
        ?>
		<div class="message success">
			<h3>Purchase Information</h3><br/>
			<p><strong>Buyer: </strong><?php 
        echo $verified['px_envato_username'];
        ?>
</p>
			<p><strong>Item: </strong><?php 
        echo $verified['px_envato_item'];
        ?>
</p>
			<p><strong>License: </strong><?php 
        echo $verified['px_envato_license'];
        ?>
</p>
			<p><strong>Purchase Code: </strong><?php 
        echo $verified['px_envato_purchase_code'];
        ?>
</p>
		</div>
		<?php 
    }
    ?>

	<form name="registerform" id="registerform" action="<?php 
    echo esc_url(site_url('wp-login.php?action=register', 'login_post'));
    ?>
" method="post">
		<input type="hidden" name="purchase_code" value="<?php 
    echo $verified['px_envato_purchase_code'];
    ?>
" />

		<p>
			<label for="user_login"><?php 
    _e('Username');
    ?>
<br />
			<input type="text" name="user_login" id="user_login" class="input" value="<?php 
    echo $verified['px_envato_username'];
    ?>
" size="20" tabindex="10" /></label>
		</p>
		<p>
			<label for="user_email"><?php 
    _e('E-mail');
    ?>
<br />
			<input type="email" name="user_email" id="user_email" class="input" value="" size="25" tabindex="20" /></label>
		</p>

		<p id="reg_passmail"><?php 
    _e('A password will be e-mailed to you.');
    ?>
</p>
		<br class="clear" />
		<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
    esc_attr_e('Register');
    ?>
" tabindex="100" /></p>
	</form>

	<p id="nav">
	<a href="<?php 
    echo esc_url(wp_login_url());
    ?>
"><?php 
    _e('Log in');
    ?>
</a> |
	<a href="<?php 
    echo esc_url(wp_lostpassword_url());
    ?>
" title="<?php 
    esc_attr_e('Password Lost and Found');
    ?>
"><?php 
    _e('Lost your password?');
    ?>
</a>
	</p>

	<?php 
    login_footer('user_login');
}
 /**
  * Display an error using login page wrapper
  *
  * @param WP_Error $error Error object
  */
 public function display_error(WP_Error $error)
 {
     login_header(__('Error'), '', $error);
     login_footer();
 }
function cimy_confirmation_form()
{
    if (empty($_POST['register_confirmation'])) {
        return;
    }
    $confirmation = false;
    $http_post = 'POST' == $_SERVER['REQUEST_METHOD'];
    $user_login = '';
    $user_email = '';
    if ($http_post) {
        $user_login = $_POST['user_login'];
        $user_email = $_POST['user_email'];
        if (function_exists("register_new_user")) {
            // fake registration to check if no errors then we'll proceed to confirmation phase
            $fake_errors = register_new_user($user_login, $user_email);
            // ok we can remove registration checks
            // 			remove_action('register_post', 'cimy_registration_check', 10);
            // 			remove_action('register_post', 'cimy_registration_captcha_check', 9);
        } else {
            return;
        }
        if (!is_wp_error($fake_errors)) {
            $redirect_to = !empty($_POST['redirect_to']) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
            wp_safe_redirect($redirect_to);
            exit;
        } else {
            if (count($fake_errors->errors) == 1 && isset($fake_errors->errors["register_confirmation"])) {
                $confirmation = true;
            }
        }
    }
    if ($confirmation) {
        global $cimy_uef_domain;
        $redirect_to = apply_filters('registration_redirect', !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '');
        $message = new WP_Error();
        $message->add('confirmation', __('Confirm your registration', $cimy_uef_domain), 'message');
        login_header(__("Confirm your registration", $cimy_uef_domain), "", $message);
        ?>
		<form name="registerform" id="registerform" action="<?php 
        echo site_url('wp-login.php?action=register', 'login_post');
        ?>
" method="post">
<?php 
        cimy_registration_form(null, 2);
        ?>
		<p id="reg_passmail"><?php 
        _e('A password will be e-mailed to you.');
        ?>
</p>
		<br class="clear" />
		<input type="hidden" name="redirect_to" value="<?php 
        echo esc_attr($redirect_to);
        ?>
" />
		<?php 
        wp_nonce_field('confirm_form', 'confirm_form_nonce');
        ?>
		<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
        esc_attr_e('Register');
        ?>
" tabindex="100" /></p>
		</form>

		<p id="nav">
		<a href="javascript: history.go(-1)"><?php 
        _e('&larr; Back', $cimy_uef_domain);
        ?>
</a>
		</p>
<?php 
        login_footer("");
        exit(0);
    }
}
    /**
     * Load Login Page For Social
     * 
     * Handles to load login page for social
     * when no email address found
     * 
     * @package Easy Digital Downloads - Social Login
     * @since 1.0.0
     */
    public function edd_slg_social_login_redirect()
    {
        global $edd_options;
        $socialtype = isset($_GET['eddslgnetwork']) ? $_GET['eddslgnetwork'] : '';
        //get all social networks
        $allsocialtypes = edd_slg_social_networks();
        if (!is_user_logged_in() && isset($_GET['edd_slg_social_login']) && !empty($socialtype) && array_key_exists($socialtype, $allsocialtypes)) {
            // get redirect url from shortcode
            $stcd_redirect_url = EDD()->session->get('edd_slg_stcd_redirect_url');
            //check button clicked from widget then redirect to widget page url
            if (isset($_GET['container']) && $_GET['container'] == 'widget') {
                // get redirect url from widget
                $stcd_redirect_url = EDD()->session->get('edd_slg_stcd_redirect_url_widget');
            }
            $redirect_url = !empty($stcd_redirect_url) ? $stcd_redirect_url : edd_slg_get_current_page_url();
            $data = array();
            //wordpress error class
            $errors = new WP_Error();
            switch ($socialtype) {
                case 'twitter':
                    //get twitter user data
                    $tw_userdata = $this->socialtwitter->edd_slg_get_twitter_user_data();
                    //check user id is set or not for twitter
                    if (!empty($tw_userdata) && isset($tw_userdata->id) && !empty($tw_userdata->id)) {
                        $data['first_name'] = $tw_userdata->name;
                        $data['last_name'] = '';
                        $data['name'] = $tw_userdata->screen_name;
                        //display name of user
                        $data['type'] = 'twitter';
                        $data['all'] = $tw_userdata;
                        $data['link'] = 'https://twitter.com/' . $tw_userdata->screen_name;
                        $data['id'] = $tw_userdata->id;
                    }
                    break;
            }
            //if cart is empty or user is not logged in social media
            //and accessing the url then send back user to checkout page
            if (!isset($data['id']) || empty($data['id'])) {
                /*if( isset( $_GET['page_id'] ) && !empty( $_GET['page_id'] ) ) {
                			$redirect_url = get_permalink( $_GET['page_id'] );
                		} else {
                			$redirect_url = home_url();
                		}*/
                if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget'])) {
                    unset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget']);
                }
                if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url'])) {
                    unset($_SESSION['edd']['edd_slg_stcd_redirect_url']);
                }
                wp_redirect($redirect_url);
                exit;
                //send user to checkout page
                //edd_slg_send_on_checkout_page();
            }
            //when user will click submit button of custom login
            //check user clicks submit button of registration page and get parameter should be valid param
            if (isset($_POST['edd-slg-submit']) && !empty($_POST['edd-slg-submit']) && $_POST['edd-slg-submit'] == __('Register', 'eddslg')) {
                $loginurl = wp_login_url();
                if (isset($_POST['edd_slg_social_email'])) {
                    //check email is set or not
                    $socialemail = $_POST['edd_slg_social_email'];
                    if (empty($socialemail)) {
                        //if email is empty
                        $errors->add('empty_email', '<strong>' . __('ERROR', 'eddslg') . ' :</strong> ' . __('Enter your email address.', 'eddslg'));
                    } elseif (!is_email($socialemail)) {
                        //if email is not valid
                        $errors->add('invalid_email', '<strong>' . __('ERROR', 'eddslg') . ' :</strong> ' . __('The email address did not validate.', 'eddslg'));
                        $socialemail = '';
                    } elseif (email_exists($socialemail)) {
                        //if email is exist or not
                        $errors->add('email_exists', '<strong>' . __('ERROR', 'eddslg') . ' :</strong> ' . __('Email already exists, If you have an account login first.', 'eddslg'));
                    }
                    if ($errors->get_error_code() == '') {
                        //
                        if (!empty($data)) {
                            //check user data is not empty
                            $data['email'] = $socialemail;
                            //create user
                            $usercreated = $this->edd_slg_add_user($data);
                            if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget'])) {
                                unset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget']);
                            }
                            if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url'])) {
                                unset($_SESSION['edd']['edd_slg_stcd_redirect_url']);
                            }
                            wp_redirect($redirect_url);
                            exit;
                            //send user to checkout page
                            //edd_slg_send_on_checkout_page();
                        }
                    }
                }
            }
            //redirect user to custom registration form
            if (isset($_GET['edd_slg_social_login']) && !empty($_GET['edd_slg_social_login'])) {
                //login call back url after registration
                /*$callbackurl = wp_login_url();
                		$callbackurl = add_query_arg('edd_slg_social_login_done', 1, $callbackurl);*/
                $socialemail = isset($_POST['edd_slg_social_email']) ? $_POST['edd_slg_social_email'] : '';
                //check the user who is going to connect with site
                //it is alreay exist with same data or not
                //if user is exist then simply make that user logged in
                $metaquery = array(array('key' => 'edd_slg_social_user_connect_via', 'value' => $data['type']), array('key' => 'edd_slg_social_identifier', 'value' => $data['id']));
                $getusers = get_users(array('meta_query' => $metaquery));
                $wpuser = array_shift($getusers);
                //getting users
                //check user is exist or not conected with same metabox
                if (!empty($wpuser)) {
                    //make user logged in
                    wp_set_auth_cookie($wpuser->ID, false);
                    if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget'])) {
                        unset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget']);
                    }
                    if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url'])) {
                        unset($_SESSION['edd']['edd_slg_stcd_redirect_url']);
                    }
                    wp_redirect($redirect_url);
                    exit;
                } else {
                    //if user is not exist then show register user form
                    login_header(__('Registration Form', 'eddslg'), '<p class="message register">' . __('Please enter your email address to complete registration.', 'eddslg') . '</p>', $errors);
                    ?>
						<form name="registerform" id="registerform" action="" method="post">
							  <p>
								  <label for="wcsl_email"><?php 
                    _e('E-mail', 'eddslg');
                    ?>
<br />
								  <input type="text" name="edd_slg_social_email" id="edd_slg_social_email" class="input" value="<?php 
                    echo $socialemail;
                    ?>
" size="25" tabindex="20" /></label>
							  </p>
							  <p id="reg_passmail">
							  	<?php 
                    _e('Username and Password will be sent to your email.', 'eddslg');
                    ?>
							  </p>
							  <br class="clear" />
							  <p class="submit"><input type="submit" name="edd-slg-submit" id="edd-slg-submit" class="button-primary" value="<?php 
                    _e('Register', 'eddslg');
                    ?>
" tabindex="100" /></p>
						</form>
					<?php 
                    login_footer('user_login');
                    exit;
                }
            }
        }
    }
Exemple #10
0
 function ll_login_footer($input_id = '')
 {
     if (!function_exists('login_header')) {
         ob_start();
         require_once ABSPATH . '/wp-login.php';
         ob_end_clean();
     }
     login_footer($input_id);
     /******
     
     		echo "</div>\n";
     
     		if ( !empty($input_id) ) {
     	    ?>
     	    <script type="text/javascript">
     	    try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
     	    if(typeof wpOnload=='function')wpOnload();
     	    </script>
     	    <?php
     		    }
     	    ?>
     	    <p id="backtoblog"><a href="<?php bloginfo('wpurl'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('&larr; Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
     	    <?php do_action('login_footer'); ?>
     	    </body>
     	    </html>
     	    <?php
     
     	********/
 }
Exemple #11
0
 /**
  * Display a message to the user after they have registered
  *
  * @uses registration_errors
  */
 public function show_user_pending_message($errors)
 {
     if (!empty($_POST['redirect_to'])) {
         // if a redirect_to is set, honor it
         wp_safe_redirect($_POST['redirect_to']);
         exit;
     }
     // if there is an error already, let it do it's thing
     if ($errors->get_error_code()) {
         return $errors;
     }
     $message = nua_default_registration_complete_message();
     $message = nua_do_email_tags($message, array('context' => 'pending_message'));
     $message = apply_filters('new_user_approve_pending_message', $message);
     $errors->add('registration_required', $message, 'message');
     $success_message = __('Registration successful.', 'new-user-approve');
     $success_message = apply_filters('new_user_approve_registration_message', $success_message);
     login_header(__('Pending Approval', 'new-user-approve'), '<p class="message register">' . $success_message . '</p>', $errors);
     login_footer();
     // an exit is necessary here so the normal process for user registration doesn't happen
     exit;
 }
function simplr_login_switch()
{
    $options = get_option('simplr_reg_options');
    if (!isset($_GET['action'])) {
        $_GET['action'] = 'login';
    }
    $action = $_GET['action'];
    global $errors;
    switch ($action) {
        case 'logout':
            check_admin_referer('log-out');
            wp_logout();
            $redirect_to = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true';
            wp_safe_redirect($redirect_to);
            exit;
            break;
        case 'lostpassword':
        case 'retrievepassword':
            ?>

		<form name="lostpasswordform" id="lostpasswordform" action="<?php 
            echo get_permalink($options->login_redirect);
            ?>
?action=lostpassword" method="post">
		<p>
			<label><?php 
            _e('Username or E-mail:', 'simplr-registration-form');
            ?>
<br />
			<input type="text" name="user_login" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
		</p>
		<?php 
            do_action('lostpassword_form');
            ?>
		<input type="hidden" name="redirect_to" value="<?php 
            echo esc_attr(@$redirect_to);
            ?>
" />
		<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
            esc_attr_e('Get New Password', 'simplr-registration-form');
            ?>
" tabindex="100" /></p>
		</form>

		<p id="nav">
		<a href="<?php 
            echo site_url('wp-login.php', 'login');
            ?>
"><?php 
            _e('Log in', 'simplr-registration-form');
            ?>
</a>
		<?php 
            if (get_option('users_can_register')) {
                ?>
			| <a href="<?php 
                echo site_url('wp-login.php?action=register', 'login');
                ?>
"><?php 
                _e('Register', 'simplr-registration-form');
                ?>
</a>
		<?php 
            }
            ?>
		</p>

		<?php 
            login_footer('user_login');
            break;
        case 'resetpass':
        case 'rp':
            $user = check_password_reset_key($_GET['key'], $_GET['login']);
            if (is_wp_error($user)) {
                wp_redirect(site_url('wp-login.php?action=lostpassword&error=invalidkey'));
                exit;
            }
            $errors = '';
            if (isset($_POST['pass1']) && $_POST['pass1'] != $_POST['pass2']) {
                $errors = new WP_Error('password_reset_mismatch', __('The passwords do not match.', 'simplr-registration-form'));
            } elseif (isset($_POST['pass1']) && !empty($_POST['pass1'])) {
                reset_password($user, $_POST['pass1']);
                login_header(__('Password Reset', 'simplr-registration-form'), '<p class="message reset-pass">' . __('Your password has been reset.', 'simplr-registration-form') . ' <a href="' . site_url('wp-login.php', 'login') . '">' . __('Log in', 'simplr-registration-form') . '</a></p>');
                login_footer();
                exit;
            }
            wp_enqueue_script('utils');
            wp_enqueue_script('user-profile');
            login_header(__('Reset Password', 'simplr-registration-form'), '<p class="message reset-pass">' . __('Enter your new password below.', 'simplr-registration-form') . '</p>', $errors);
            ?>
		<form name="resetpassform" id="resetpassform" action="<?php 
            echo get_permalink($options->login_redirect) . '?action=resetpass&key=' . urlencode($_GET['key']) . '&login='******'login']);
            ?>
" method="post">
		<input type="hidden" id="user_login" value="<?php 
            echo esc_attr($_GET['login']);
            ?>
" autocomplete="off" />

		<p>
			<label><?php 
            _e('New password', 'simplr-registration-form');
            ?>
<br />
			<input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /></label>
		</p>
		<p>
			<label><?php 
            _e('Confirm new password', 'simplr-registration-form');
            ?>
<br />
			<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /></label>
		</p>

		<div id="pass-strength-result" class="hide-if-no-js"><?php 
            _e('Strength indicator', 'simplr-registration-form');
            ?>
</div>
		<p class="description indicator-hint"><?php 
            _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).', 'simplr-registration-form');
            ?>
</p>

		<br class="clear" />
		<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
            esc_attr_e('Reset Password', 'simplr-registration-form');
            ?>
" tabindex="100" /></p>
		</form>

		<p id="nav">
		<a href="<?php 
            echo site_url('wp-login.php', 'login');
            ?>
"><?php 
            _e('Log in', 'simplr-registration-form');
            ?>
</a>
		<?php 
            if (get_option('users_can_register')) {
                ?>
			| <a href="<?php 
                echo site_url('wp-login.php?action=register', 'login');
                ?>
"><?php 
                _e('Register', 'simplr-registration-form');
                ?>
</a>
		<?php 
            }
            ?>
		</p>

		<?php 
            login_footer('user_pass');
            break;
        case 'login':
        default:
            $redirect_to = !isset($redirect_to) ? apply_filters('simplr_login_redirect', home_url(), $action) : $redirect_to;
            if (isset($_POST['log'])) {
                $user_login = '******' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ? esc_attr(stripslashes($_POST['log'])) : '';
            }
            $rememberme = !empty($_POST['rememberme']);
            ?>

		<form name="loginform" id="loginform" action="<?php 
            echo get_permalink($options->login_redirect);
            ?>
?action=<?php 
            echo $action;
            ?>
" method="post">
		<p>
			<label><?php 
            _e('Username', 'simplr-registration-form');
            ?>
<br />
			<input type="text" name="log" id="user_login" class="input" value="<?php 
            echo esc_attr(@$user_login);
            ?>
" size="20" tabindex="10" /></label>
		</p>
		<p>
			<label><?php 
            _e('Password', 'simplr-registration-form');
            ?>
<br />
			<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
		</p>
		<?php 
            do_action('login_form');
            ?>
		<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90"<?php 
            checked($rememberme);
            ?>
 /> <?php 
            esc_attr_e('Remember Me', 'simplr-registration-form');
            ?>
</label></p>
		<p class="submit">
			<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
            esc_attr_e('Log In', 'simplr-registration-form');
            ?>
" tabindex="100" />
		<?php 
            if (isset($interim_login)) {
                ?>
			<input type="hidden" name="interim-login" value="1" />
		<?php 
            } else {
                ?>
			<input type="hidden" name="redirect_to" value="<?php 
                echo esc_attr($redirect_to);
                ?>
" />
		<?php 
            }
            ?>
			<input type="hidden" name="testcookie" value="1" />
		</p>
		</form>

		<?php 
            if (!isset($interim_login)) {
                ?>
			<p id="nav">
			<?php 
                if (isset($_GET['checkemail']) && in_array($_GET['checkemail'], array('confirm', 'newpass'))) {
                    ?>
			<?php 
                } elseif (get_option('users_can_register')) {
                    ?>
				<a href="<?php 
                    echo site_url('wp-login.php?action=register', 'login');
                    ?>
"><?php 
                    _e('Register', 'simplr-registration-form');
                    ?>
</a> |
				<a href="<?php 
                    echo site_url('wp-login.php?action=lostpassword', 'login');
                    ?>
" title="<?php 
                    _e('Password Lost and Found', 'simplr-registration-form');
                    ?>
"><?php 
                    _e('Lost your password?', 'simplr-registration-form');
                    ?>
</a>
			<?php 
                } else {
                    ?>
				<a href="<?php 
                    echo site_url('wp-login.php?action=lostpassword', 'login');
                    ?>
" title="<?php 
                    _e('Password Lost and Found', 'simplr-registration-form');
                    ?>
"><?php 
                    _e('Lost your password?', 'simplr-registration-form');
                    ?>
</a>
			<?php 
                }
                ?>
			</p>
		<?php 
            }
            ?>

		<script type="text/javascript">
		function wp_attempt_focus(){
			setTimeout( function(){ try{
				<?php 
            if (isset($user_login) || isset($interim_login)) {
                ?>
					d = document.getElementById('user_pass');
					d.value = '';
				<?php 
            } else {
                ?>
					d = document.getElementById('user_login');
					<?php 
                if ('invalid_username' == @$errors->get_error_code()) {
                    ?>
						if( d.value != '' )
							d.value = '';
						<?php 
                }
            }
            ?>
				d.focus();
				d.select();
			} catch(e){}
			}, 200);
		}

		<?php 
            if (!$error) {
                ?>
			wp_attempt_focus();
		<?php 
            }
            ?>
		if(typeof wpOnload=='function') wpOnload();
		</script>

		<?php 
            login_footer();
            break;
    }
    // end action switch
}
 public function rpr_login_form_adminverify()
 {
     global $register_plus_redux;
     global $errors;
     if (is_array($errors->errors) && isset($errors->errors['registered'])) {
         $temp = $errors->errors;
         unset($temp['registered']);
         $errors->errors = $temp;
     }
     if (is_array($errors->error_data) && isset($errors->error_data['registered'])) {
         $temp = $errors->error_data;
         unset($temp['registered']);
         $errors->error_data = $temp;
     }
     if (!is_wp_error($errors)) {
         $errors = new WP_Error();
     }
     $errors->add('verify_user_admin', nl2br($register_plus_redux->rpr_get_option('message_verify_user_admin')), 'message');
     login_header(__('Admin Verification', 'register-plus-redux'), '', $errors);
     login_footer();
     exit;
 }
function new_twitter_request_email()
{
    $user_email = '';
    $errors = new WP_Error();
    if (isset($_POST['user_email'])) {
        $user_email = $_POST['user_email'];
        if ($user_email == '') {
            $errors->add('empty_email', __('<strong>ERROR</strong>: Please type your e-mail address.'));
        } elseif (!is_email($user_email)) {
            $errors->add('invalid_email', __('<strong>ERROR</strong>: The email address isn&#8217;t correct.'));
            $user_email = '';
        } elseif (email_exists($user_email)) {
            $errors->add('email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'));
        }
        if (isset($_POST['user_email']) && $errors->get_error_code() == '') {
            return $user_email;
        }
    }
    login_header(__('Registration Form'), '<p class="message register">' . __('Please enter your email address to register!') . '</p>', $errors);
    ?>
  <form name="registerform" id="registerform" action="<?php 
    echo esc_url(site_url('wp-login.php?loginTwitter=1', 'login_post'));
    ?>
" method="post">
          <p>
                  <label for="user_email"><?php 
    _e('E-mail');
    ?>
<br />
                  <input type="email" name="user_email" id="user_email" class="input" value="<?php 
    echo esc_attr(stripslashes($user_email));
    ?>
" size="25" tabindex="20" /></label>
          </p>
          <p id="reg_passmail"><?php 
    _e('A password will be e-mailed to you.');
    ?>
</p>
          <br class="clear" />
          <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
    esc_attr_e('Register');
    ?>
" tabindex="100" /></p>
  </form>
  <?php 
    login_footer('user_login');
    exit;
}
        function show_reset_password_form($user, $oncerkey, $redirect_to = false, $errors = false)
        {
            if (!is_a($user, 'WP_User')) {
                // Ooops we don't have a user to use :( return to the login form as this shouldn't happen except in hack attempts
                wp_safe_redirect(wp_login_url());
                exit;
            }
            wp_enqueue_script('utils');
            wp_enqueue_script('user-profile');
            // We are going to save our key to a oncer for later checking - but set it to expire in 5 minutes
            shrkey_set_usermeta_timed_oncer($user->ID, '_shrkey_password_expired_key', $oncerkey, '+5 minutes');
            login_header(__('Expired Password', 'expirepassword'), '<p class="message reset-pass">' . __('Your password has <strong>expired</strong>. Enter a new password below.', 'expirepassword') . '</p>', $errors);
            ?>
			<form name="expiredpasswordform" id="expiredpasswordform" method="post" action="<?php 
            echo esc_url(site_url('wp-login.php?action=expiredpassword', 'login_post'));
            ?>
">
				<input type="hidden" name="user_login" id="user_login" value="<?php 
            echo esc_attr($user->user_login);
            ?>
" autocomplete="off" />
				<input type="hidden" name="key" id="key" value="<?php 
            echo esc_attr($oncerkey);
            ?>
" autocomplete="off" />
				<input type="hidden" name="redirect_to" id="redirect_to" value="<?php 
            echo esc_attr($redirect_to);
            ?>
" autocomplete="off" />

					<label for="pass1"><?php 
            _e('New password');
            ?>
</label><br />
					<div class="wp-pwd">
						<span class="password-input-wrapper">
							<input type="password" data-reveal="1" data-pw="<?php 
            echo esc_attr(wp_generate_password(16));
            ?>
" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" aria-describedby="pass-strength-result" />
						</span>
						<div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php 
            _e('Strength indicator');
            ?>
</div>
					</div>
				</p>
				<p class="user-pass2-wrap">
					<label for="pass2"><?php 
            _e('Confirm new password');
            ?>
</label><br />
					<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
				</p>

				<p class="description indicator-hint"><?php 
            _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).', 'expirepassword');
            ?>
</p>

				<br class="clear" />
				<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php 
            esc_attr_e('Reset Password', 'expirepassword');
            ?>
" /></p>
			</form>
			<?php 
            // Show the standard footer
            login_footer('pass1');
        }
    public function login_init_callback()
    {
        global $action;
        $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login';
        $errors = new WP_Error();
        if (isset($_GET['key'])) {
            $action = 'resetpass';
        }
        // validate action so as to default to the login screen
        if (!in_array($action, array('logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', $this->new_action, 'register', 'login'), true) && false === has_filter('login_form_' . $action)) {
            $action = 'login';
        }
        $http_post = 'POST' == $_SERVER['REQUEST_METHOD'];
        switch ($action) {
            case 'register':
                //Registration using 'register' action is now disabled!
                wp_redirect(site_url('wp-login.php?registration=disabled'));
                exit;
            case $this->new_action:
                //$action = 'register';
                if (is_multisite()) {
                    // Multisite uses wp-signup.php
                    wp_redirect(apply_filters('wp_signup_location', site_url('wp-signup.php')));
                    exit;
                }
                if (!get_option('users_can_register')) {
                    wp_redirect(site_url('wp-login.php?registration=disabled'));
                    exit;
                }
                $user_login = '';
                $user_email = '';
                if ($http_post) {
                    $user_login = $_POST['user_login'];
                    $user_email = $_POST['user_email'];
                    $errors = register_new_user($user_login, $user_email);
                    if (!is_wp_error($errors)) {
                        $redirect_to = !empty($_POST['redirect_to']) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
                        wp_safe_redirect($redirect_to);
                        exit;
                    }
                }
                $redirect_to = apply_filters('registration_redirect', !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '');
                login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
                ?>

			<form name="registerform" id="registerform" action="<?php 
                echo site_url('wp-login.php?action=' . $this->new_action, 'login_post');
                ?>
" method="post">
				<p>
					<label><?php 
                _e('Username');
                ?>
<br />
					<input type="text" name="user_login" id="user_login" class="input" value="<?php 
                echo esc_attr(stripslashes($user_login));
                ?>
" size="20" tabindex="10" /></label>
				</p>
				<p>
					<label><?php 
                _e('E-mail');
                ?>
<br />
					<input type="text" name="user_email" id="user_email" class="input" value="<?php 
                echo esc_attr(stripslashes($user_email));
                ?>
" size="25" tabindex="20" /></label>
				</p>
			<?php 
                do_action('register_form');
                ?>
				<p id="reg_passmail"><?php 
                _e('A password will be e-mailed to you.');
                ?>
</p>
				<br class="clear" />
				<input type="hidden" name="redirect_to" value="<?php 
                echo esc_attr($redirect_to);
                ?>
" />
				<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php 
                esc_attr_e('Register');
                ?>
" tabindex="100" /></p>
			</form>

			<p id="nav">
			<a href="<?php 
                echo site_url('wp-login.php', 'login');
                ?>
"><?php 
                _e('Log in');
                ?>
</a> |
			<a href="<?php 
                echo site_url('wp-login.php?action=lostpassword', 'login');
                ?>
" title="<?php 
                _e('Password Lost and Found');
                ?>
"><?php 
                _e('Lost your password?');
                ?>
</a>
			</p>

			<?php 
                login_footer('user_login');
                //break;
                exit;
        }
    }