Posts

Showing posts from April, 2018

password check to existing encrypted password in wordpress

<?php $password_hashed = '$P$BAiyif/mcNl74tff9CfJnJON9Y7zU0.';                 $plain_password = '123456';                 if ((wp_check_password($plain_password, $password_hashed)) == 1) {                     echo "YES, Matched";                 } else {                     echo "No, Wrong Password";                 } ?>

custom wordpress query using wpdb without wordpress page template.

<?php $mydb = new wpdb('sigma_db','sigma$#2018','sigamadb','localhost'); $rows = $mydb->get_results("select `user_login`,`user_pass`,`user_email` from `wp_users`"); echo "<ul>"; foreach ($rows as $obj) :    echo "<li>".$obj->user_login."</li>"; endforeach; echo "</ul>"; ?>