You can get collection of customer through :
$collection = Mage::getModel('customer/customer')->getCollection();
Filter you collection according to attribute :
$collection->addAttributeToFilter('refcode', array('eq' => 1));
}
Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('rms_id', 'youremailhere')->load();
You can get collection of customer through :
$collection = Mage::getModel('customer/customer')->getCollection();
Filter you collection according to attribute :
$collection->addAttributeToFilter('refcode', array('eq' => 1));
Mage::getModel('catalog/product')->loadByAttribute('sku', 'My Sku Value');