I am making a loginform in WORDPRESS and i want to have a validation on it, so i tried to look at the wp-login.php to see how they validate things. But i did not find what i am looking for. I would like to know how they validate things or what input do they need to validate things. I tried to search the wordpress forums all i can find is plugin, plugin and more plugin. I dont want a plugin. I want to hardcode it. So please help me.
- I want to know where you can find the part that searches for the users username and password.
- Or if not , know what is needed for a successful login. example username or password or others.
by the way here is the wp-login.php. THanks
Indeed the auth logic is not located in
wp-login.php.WordPress relies a lot on hooks (actions and filters). For authentication, this article explain some of the process in wordpress 2.8+. AFAIK this is still the same in 3.x.
Authentication process is based on the
authenticatefilter. Two hooks are added in the filter queue :wp_authenticate_username_password() (priority 20) in
wp-includes/user.php(line 68)wp_authenticate_cookie() (priority 30) in
wp-includes/user.php(line 117)See the article for more details.
I encourage you not to hack the core directly but add some hooks on this filter with higher priorities.