Skip to content

Verify Password through Code [drupal cms]

function isUserPassValid($userId, $password) {

	$account = user_load_by_name($username);
//	$account = user_load_by_name(user_load($userId));

       
	if (user_check_password($password,$account))
	{
            return TRUE;
	}
	else {
            return FALSE;
	}

}

Leave a Reply

Your email address will not be published.