OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxuserlist.php
Go to the documentation of this file.
1 <?php
2 
7 class oxUserList extends oxList
8 {
16  public function __construct( $sObjectsInListName = 'oxuser')
17  {
18  parent::__construct( 'oxuser');
19  }
20 
21 
29  public function loadWishlistUsers( $sSearchStr)
30  {
31  $sSearchStr = oxDb::getInstance()->escapeString($sSearchStr);
32  if (!$sSearchStr) {
33  return;
34  }
35 
36  $sSelect = "select oxuser.oxid, oxuser.oxfname, oxuser.oxlname from oxuser ";
37  $sSelect .= "left join oxuserbaskets on oxuserbaskets.oxuserid = oxuser.oxid ";
38  $sSelect .= "where oxuserbaskets.oxid is not null and oxuserbaskets.oxtitle = 'wishlist' ";
39  $sSelect .= "and oxuserbaskets.oxpublic = 1 ";
40  $sSelect .= "and ( oxuser.oxusername like '%$sSearchStr%' or oxuser.oxlname like '%$sSearchStr%')";
41  $sSelect .= "and ( select 1 from oxuserbasketitems where oxuserbasketitems.oxbasketid = oxuserbaskets.oxid limit 1)";
42 
43  $this->selectString($sSelect);
44  }
45 }