Contenu connexe
Similaire à WordPress Third Party Authentication
Similaire à WordPress Third Party Authentication (20)
Plus de Aaron Brazell (10)
WordPress Third Party Authentication
- 3. I am not a crypto, but I did stay at a Holiday Inn Express Last Night!
- 7. if ( !function_exists('wp_authenticate') ) : function wp_authenticate($username, $password) { $username = sanitize_user($username); $password = trim($password); $user = apply_filters('authenticate', null, $username, $password); if ( $user == null ) { // TODO what should the error message be? (Or would these even happen?) // Only needed if all authentication handlers fail to return anything. $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.')); } $ignore_codes = array('empty_username', 'empty_password'); if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) { do_action('wp_login_failed', $username); } return $user; } endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif; endif;