oxuserlist.php

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