Customizing lost password email

You want the filters… retrieve_password_message for the actual email content. Your hooked function will get the message as the first argument and the user’s reset key as the second. <?php add_filter(‘retrieve_password_message’, ‘wpse103299_reset_msg’, 10, 2); function wpse103299_reset_msg($message, $reset_key) { // … } retrieve_password_title for the the email subject. <?php add_filter(‘retrieve_password_title’, ‘wpse103299_reset_subject’); function wpse103299_reset_subject($subject) { // … … Read more

Password protected posts redirects

TL;TR? Spoiler alert – hover over the next blockquote to expose it. Building an archive that is easily filterable by the currently entered password is nothing that is easy and surely not elegant buildable. The solution involves a secondary query and a small plugin, but it works. All errors and wrong paths are shown as … Read more

Best way to send users password?

You shouldn’t have to send them passwords. That’s a bad idea. Instead, make sure your web server has email setup properly and your user accounts have the correct email addresses. Then all you’ll have to do is send them the link to the Forgot Password link provided by WordPress by default. It looks like this: … Read more

Check the password of a user

Your example works correctly. You are checking if password hello matches hashed hello – which it naturally does. Hadn’t thought it through. Your example causes following issue: You check if hello matches md5 of hello (instead of hash from user’s profile). It does and then WP thinks this is correct, but outdated md5 hash – … Read more

Bypass password protected posts via GET variable

The check for a post password happens (for some reason) inside get_the_content(), which seems legit, but actually mixes together two separate concerns. You were right with the statement that there is no way to work around get_the_content() displaying the password form. Here’s what the check for the password does in core in detail: if ( … Read more

Network Admin “You do not have sufficient permissions to access this page.”

The easiest way to restore Super Admin privileges is to add a bit of code to your theme’s functions.php file to add yourself back: include(ABSPATH . ‘wp-admin/includes/ms.php’); $user = get_userdatabylogin(‘YOUR_USERNAME’); grant_super_admin($user->ID); Once your Super Admin privileges have been restored you can remove this code from your theme.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)