Remote check to see if user exists?
-
Hi I am using Jquery to validate a form and I need to be able to check to see if the user exists by doing a callback to a custom php file check-user.php
I have included includes/user.php but I seem to be missing something.
I have searched for a while and come up with nothing what else do I need to include before includes/user.php to make wordpress work with this?<?php include("config.php"); include( $path . 'wp-admin/includes/user.php' ); $username = $_POST['user_login']; function username_exists( $username ) { if ( $user = get_user_by( 'login', $username ) ) { return $user->ID; } return false; } $ckuser = username_exists( $username ); echo $ckuser; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remote check to see if user exists?’ is closed to new replies.