Why is the reset password key missing in the reset password email?

The site’s original developer was using the reset_password_message filter and had either done it incorrectly or the core code has changed. The following function now works: function reset_password_message( $message, $key ) { if ( strpos($_POST[‘user_login’], ‘@’) ) { $user_data = get_user_by(’email’, trim($_POST[‘user_login’])); } else { $login = trim($_POST[‘user_login’]); $user_data = get_user_by(‘login’, $login); } $user_login = … Read more

How to increase password requirements for registration [closed]

Use a hook that fires later and add the $bp global to the function. Try this: function bp_password_beefing() { global $bp; if ( !empty( $_POST[‘signup_password’] ) ) if ( strlen( $_POST[‘signup_password’] ) < 6 ) $bp->signup->errors[‘signup_password’] = __( ‘Your password needs to be at least 6 characters’, ‘buddypress’ ); } add_action( ‘bp_signup_validate’, ‘bp_password_beefing’);

Upload files programmatically to users

it was just missing $upload_dir[‘path’] . “https://wordpress.stackexchange.com/” . $upload_file_name in $uploaded_file[‘attach_id’] = wp_insert_attachment($attachment, $upload_dir[‘path’] . “https://wordpress.stackexchange.com/” . $upload_file_name); require_once(ABSPATH . ‘wp-admin/includes/image.php’); //Generate the metadata for the attachment, and update the database record. $attach_data = wp_generate_attachment_metadata($uploaded_file[‘attach_id’], $upload_dir[‘path’] . “https://wordpress.stackexchange.com/” . $upload_file_name);

Registration e-mail check with AJAX

You have missed few things in your ajax. Please find following updated code which will help you to solve your problem function add_ajaxurl_cdata_to_front(){ ?> <script type=”text/javascript”> //<![CDATA[ ajaxurl=”<?php echo admin_url( “admin-ajax.php’ ); ?>’; //]]> </script> <?php } add_action( ‘wp_head’, ‘add_ajaxurl_cdata_to_front’, 1); add_action( ‘wp_footer’, ‘add_js_to_wp_footer’ ); function add_js_to_wp_footer(){ ?> <script type=”text/javascript”> jQuery(‘document’).ready(function(){ jQuery(‘#reg_email’).on(“change”,function(){ jQuery.ajax({ type: ‘POST’, … Read more

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