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