Home / Wo Custom User Login CODEX

Wo Custom User Login CODEX

if(!$_email){
	$error['_email'] = __('Enter username/email');
}
if(!$_password){
	$error['_password'] = __('Enter password');
}

if(!$error){
	$authenticate = wp_authenticate( $_email, $_password );
	if($authenticate->errors){
		$error['_email']    = __('Oops!');
		$error['_password'] = __('Invalid credential');
	}elseif($authenticate->data){
		// Your action here
	}
}

all rights reserved