Can I use core passworded page/post functions outside of wp-login.php?
Can I use core passworded page/post functions outside of wp-login.php?
Can I use core passworded page/post functions outside of wp-login.php?
This may be marked as resolved since Studiopress Forum Support has given the needed direction on their site directly.
You just need to add your own action before any errors are returned, and if there is an error, redirect back to your page and display the error add_action( ‘lostpassword_post’, ‘smyles123_check_for_errors’ ); function smyles123_check_for_errors( $errors ){ if ( $errors->get_error_code() ){ // REDIRECT BACK TO YOUR PAGE TO SHOW ERRORS // You can probably just append … Read more
You can use the same principle as the worked example, however replace $_GET with $_POST. So you’d have something like this towards the end: // Your custom check for the ‘$_POST’ content // …also check if there in fact is a password // …and if the user is a repeated visitor, do not set the … Read more
There is nothing wrong with the “just MD5 also works” on my WordPress installation. As I was creating users via INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, display_name,user_registered) VALUES (‘login’, MD5(‘password’), ‘Name Surname’, ’[email protected]’, ‘username’,now()); INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, (Select max(id) FROM wp_users), ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’); INSERT INTO wp_usermeta (umeta_id, user_id, … Read more
Because the_content doesn’t even process until the password has been successfully entered, you can add a shortcode that redirects the page, that shortcode will run only with good password. So, something like the following should work: add_shortcode( ‘pdf_redirect’, function ( $atts ) { $a = shortcode_atts( array( ‘url’ => ”, ), $atts ); // instructions … Read more
There is no password field (unless you use a specific plugin). You register for an account with a login name and email. You then get an email with a link to set your password. If you want to have users enter a password when they register, you should look into using a plugin or so, … Read more
Rather than changing passwords on the posts/pages themselves, you could reset the users’ passwords every month. You would set up your posts/pages/CPTs such that only logged-in users of a certain role could view the pages you want to protect, assign everyone that role, and email them their monthly password. That way, when they try to … Read more
Lost Password redirect to My Account
I ended up making the whole WP site private except to logged in users by using a plugin (Ultimate Member). Then I created a single login which would be used from the .Net site. The way it works is: User clicks on link within .Net site to access WordPress site Server-side: performs POST to /wp-login.php … Read more