wordpress custom password change problem
the problem is with your cookies.wp_update_user function is trying to change them after all headers were sent, try to use such code like that: function my_func(){ // your code } add_action(‘init’,’my_func’);
the problem is with your cookies.wp_update_user function is trying to change them after all headers were sent, try to use such code like that: function my_func(){ // your code } add_action(‘init’,’my_func’);
Quick and dirty: add something that runs during the WordPress init action that checks your the domain.com login status, and dies if the person isn’t logged in. At a very basic level (if you don’t need a pretty “access denied” page or anything), you can do something as simple as this in a plugin: function … Read more
On a page or post, Under the right sidebar “Publish” Click Visibility –> Edit –> Select password protected, set the password. If you want only partial protection, say only some content, you will need a plugin.
I’m not sure what the hosting provider Fat Cow gives you but if you have cPanel and phpMyAdmin, you can log into phpMyAdmin, find the database for your WordPress installation, and then find the wp_users table. Find one of the duplicates (2 entries with the same name) and delete one of them. Reset your password … Read more
Turns out it was a problem with my browser blocking HTTP referrers. Disabling referrer blocking or switching to another browser solves the issue. (related Trac ticket)
The easier way can be have a group of users called teachers and give just the teacher’s group the permission to visit the page. There are many plugins for permission handling and grouping users so you’ll just need to search WordPress plugin repository. Just an example: groups plugin Another possible answer can be : multi … Read more
I really don’t see the point of “launching” a website that is still in development, only to be seen by the developers and the client. By all definitions, that’s not ‘launching a website’ 🙂 If the client can accept the fact that the website is still in development and the launch part takes place only … Read more
You have to get user’s hash (hash is encrypted password) from the database: get_currentuserinfo(); $user_hash = $current_user->user_pass_md5; Then check if it’s correct: wp_check_password( $password, $user_hash, $user_id ); $password – Plaintext user’s password from input $user_hash – Encrypted password from database $user_id – user ID I guess But as Mark said in comment – this is … Read more
The check is handled by post_password_required(), which seems to be incredibly inconvenient to override. The only way I can think of is early during load: Check if there is a valid WP cookie (if there we are done). Check if there is valid external cookie (if not we are done). If there is then generate … Read more
I was missing something. Woocommerce accounts are different from normal WordPress accounts. The code that I was looking for was: function woocommerce_new_pass_redirect( $user ) { wp_redirect( get_permalink(woocommerce_get_page_id(‘myaccount’))); exit; } add_action( ‘woocommerce_customer_reset_password’, ‘woocommerce_new_pass_redirect’ ); I found it on stackoverflow.