00001 <?php 00002 00007 class oxUserList extends oxList 00008 { 00016 public function __construct( $sObjectsInListName = 'oxuser') 00017 { 00018 parent::__construct( 'oxuser'); 00019 } 00020 00021 00029 public function loadWishlistUsers( $sSearchStr) 00030 { 00031 $sSearchStr = mysql_real_escape_string($sSearchStr); 00032 if (!$sSearchStr) { 00033 return; 00034 } 00035 00036 $sSelect = "select oxuser.oxid, oxuser.oxfname, oxuser.oxlname from oxuser "; 00037 $sSelect .= "left join oxuserbaskets on oxuserbaskets.oxuserid = oxuser.oxid "; 00038 $sSelect .= "where oxuserbaskets.oxid is not null and oxuserbaskets.oxtitle = 'wishlist' "; 00039 $sSelect .= "and oxuserbaskets.oxpublic = 1 "; 00040 $sSelect .= "and ( oxuser.oxusername like '%$sSearchStr%' or oxuser.oxlname like '%$sSearchStr%')"; 00041 $sSelect .= "and ( select 1 from oxuserbasketitems where oxuserbasketitems.oxbasketid = oxuserbaskets.oxid limit 1)"; 00042 00043 $this->selectString($sSelect); 00044 } 00045 }