json - Using Wordpress Authentication in Xcode -
i building ios app use json api content. how authenticate wordpress db set in order retrieve content available after you've logged in.
<?php require_once('wp-load.php'); $username = $password = ""; // check see if email or username check if(filter_var($username, filter_validate_email)) $user = get_user_by('email',$username); else $user = get_user_by('login',$username); $validuser = false; if ( $user , wp_check_password($password, $user->data->user_pass, $user->id) ) $validuser = true; ?>
Comments
Post a Comment