Site icon Hip-Hop Website Design and Development

current client’s secret word check

I am fostering my-account page.

I set to alter client’s information.

However. I can’t track down the specific data about how to check the secret word prior to refreshing client’s information.

Maybe, wp_check_password() would works.. however, I don’t know hot to apply. My codes are underneath. Be that as it may, it doesn’t works. Would you be able to give me hand?

$current_user = wp_get_current_user(); 

$user = get_user_by( 'login', $current_user->ID ); 

$pass_check = esc_attr($_POST['password']); 

in the event that ( $user && wp_check_password( $pass_check, $user->data->user_pass, $user->ID) ) { 

wp_redirect( get_permalink() . '?validation=passwordincorrect' ); 

exit; 

} 

Thank you.