Tag Info

New answers tagged

0

In short you want to mach your password with real hash code right. $user = get_user_by( 'login', $username ); if ( $user && wp_check_password( '123456', $user->data->user_pass, $user->ID) ) echo "password Matched"; else echo "Not matched";


0

Actually, didn't find this in documentation or in search engine results, but this does the trick: wp user update USERNAME --user_pass=PASSWORD (Found it here.)


1

Put this in your .htaccess file after your password protection on the entire site: <Files "page.php"> Allow from all Satisfy any


0

I haven't looked into it, but any hook on the page that processes the new user registration will have access to the $_POST data and as such you could get it from there. I agree with the other comments above, you should be able to use use the WordPress hash and check the password on the other website. Would be more sustainable and less susceptible to ...


3

Stop what you're doing - it's so much simpler! function wpse_191369_post_password_expires() { return time() + 10; // Expire in 10 seconds } add_filter( 'post_password_expires', 'wpse_191369_post_password_expires' ); That's all you need.


0

In your functions.php you could create a shortcode that shows the link only if a valid password was supplied. This would look like the following code (untested): function protected_download_handler( $atts ){ if (in_array(@$_REQUEST['password'], array('password1', 'password2', 'password3')) { $return = '<a ...



Top 50 recent answers are included