Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

wp_set_password() does not work!

Nested if/else/elseifs are usually too complex for me to figure out.

I’d change your code to use SWITCH/CASE to determine proper input and to change the password if all is OK.

And to sanitize $_POST (and $_GET) inputs, I just put this in my functions file:

$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);

Then I don’t have to remember to sanitize things elsewhere.

Related Posts:

  1. Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
  2. Tips on using a custom template with Ultimate Member
  3. Gravityforms login form custom redirect if form not submitted
  4. Contact form 7 select box different value-text than content-text in option [closed]
  5. Where the Nickname is being used in WordPress
  6. Remove WordPress Toolbar buttons
  7. Simple form that saves to database
  8. How do I email a new page password to somebody every month?
  9. Let readers suggest edits from the frontend
  10. Get selected values from checkboxes and radio buttons via Gravity Forms gform_after_submission hook [closed]
  11. Where should my plugin POST to?
  12. How to hide fields from my user profiles
  13. Plugin development: how to create a form and get custom data?
  14. Add new password rule to Ultimate Member register form
  15. login to wordpress with Get variables instead of Post
  16. Multi step form, custom plugin
  17. Multiple Password Portal Page BEFORE User Account Set Up
  18. shortcode doesn’t work
  19. Is it possible to block subscriber users to changing its password?
  20. Contact Form 7 plugin refreshing page on submit [closed]
  21. Template plugin for blog posts? [closed]
  22. Plugin form unable to process
  23. Trying to add admin file upload form plugin
  24. Problem protecting a page with a password
  25. How to disable autocomplete for inputs in contact form 7? [closed]
  26. Remove toolbar option (and set to default to no) in user profile
  27. Login with email (WP Modal Login)
  28. How to display public user profile with 2 additional fields? (GitHub source code included)
  29. How to create a word press user with hashedpassword
  30. WordPress Custom Application form
  31. When is it useful to use wp_verify_nonce
  32. Datepicker not supporting timepicker
  33. add function to saving change on Options Pages
  34. Disable WordPress password reset via mails,instead notify admin about the reset request
  35. WordPress plugin form not saving data
  36. Admin page: form with enctype=”multipart/form-data” does not transfer its data
  37. jQuery Plugin to use WordPress functions in AJAX request
  38. WordPress login with Phone Number [closed]
  39. How to make first_name and last_name required fields in user profile?
  40. Preventing BFA in WordPress without using a plugin
  41. How to upload user profile image from frontend in wordpress ?
  42. Add form fields dynamically on button click
  43. How to trigger $_GET request within admin plugin page?
  44. Retrieving a Value from a wp-database
  45. Custom CSS for plugin form
  46. Form doesn’t submit on second submit call
  47. WP plugins for building a database?
  48. Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
  49. Custom form action to handle data inside a plugin
  50. How to delete Passwrd Protected posts cookies when a user logged out from the site
  51. Is there an earlier hook than login_head or login_enqueue_scripts?
  52. wp_create_nonce function doesn’t work inside a plugin?
  53. Form isn’t inserting data into database with ajax plugin
  54. New User Form – Custom Menu Page
  55. Image upload and other options in the same plugin settings form?
  56. Information and Videos for Customers in the Backend [closed]
  57. When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
  58. Anonymous Postings
  59. Creating an online questionnaire form – by Importing the questions from a spreadsheet?
  60. Can I use custom CSS and js plugin to put JavaScript in to validate my forms
  61. Using a custom plugin to capture input data via Ajax and PHP
  62. Redirecting a buddyboss profile tab to a different tab if not subscribed to a specific membership
  63. Redirect already logged in users away from a page to a specific page base on user role
  64. auto populate list of questions if user select a category xyz
  65. WordPress WPforms customization
  66. Contributive page where people logged in can write
  67. Contact Form 7 Get Image Function [closed]
  68. Submit page limited in time to upload image
  69. Adapt PHP form action for WordPress?
  70. Is there any way to use google input tool or any other language keyboard with WordPress [closed]
  71. Ajax fail and get 504 error
  72. Take input from form and pass it to function using a wp-plugin
  73. Checkbox conflict in my custom plugin admin page
  74. Can you use another Profile Builder shortcodes through advanced custom fields
  75. How to insert HTML/JavaScript form into WordPress page? [closed]
  76. Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
  77. How do I make a child theme I made POST through a 3rd party plugin?
  78. WP Plugins – Use includes to display page content
  79. How to redirect users to their profile after they successfully edit their profile
  80. How to fetch form data and show it to my page?
  81. Plugin to create forms using HTML [closed]
  82. Submit custom form from post content and execute in plugin
  83. How to allow user to select User ID in Formidable Pro form? [closed]
  84. Char limit on custom blog-post form? [closed]
  85. Enqueue stylesheet in plugin for wp-login.php
  86. AJAX fileupload – TypeError: not a function ajaxSubmit()
  87. Is there a way to embed a Google Docs form in a page without using plugins?
  88. Detailed form plugin, with ability to export to excel etc. OR edit PDF live? [closed]
  89. easy steps to make front end form without plugin
  90. Form that generates an ID for the customer
  91. Completely disabling password reset/recovery
  92. How to have sample page for each new register users in a membership website
  93. Submit Form data to another page via Ajax (WordPress Way)
  94. How to extract data from ‘edit my profile’ page in WordPress?
  95. Editing a text file from plugin menu
  96. Specific way to allow WordPress users to view their current password? And edit it?
  97. how to connect the author profile with google webmaster tools in multiuser blog?
  98. Ajax Plugin Not Echoing Response
  99. Plugin that will output submitted form data for user? [closed]
  100. How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
Categories plugins Tags forms, password, plugins, profiles, wp-login-form
Sudden 404 pages on product category archives
Install wordpress without affecting clickfunnels

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress