00001 <?php
00002
00009 class User_List extends oxAdminList
00010 {
00016 protected $_sListClass = 'oxuser';
00017
00023 protected $_sDefSort = "oxuser.oxusername";
00024
00030 protected $_sListType = 'oxuserlist';
00031
00036 protected $_sThisTemplate = 'user_list.tpl';
00037
00044 public function init()
00045 {
00046 parent::Init();
00047
00048
00049 foreach ( $this->_oList as $name => $value ) {
00050 if ( $value->inGroup( "oxidblacklist") || $value->inGroup( "oxidblocked")) {
00051 $value->blacklist = "1";
00052 $this->_oList[$name] = $value;
00053 }
00054 $this->_oList[$name]->blPreventDelete = false;
00055 if (!$this->_allowAdminEdit($name)) {
00056 $this->_oList[$name]->blPreventDelete = true;
00057 }
00058 }
00059 }
00060
00067 public function deleteEntry()
00068 {
00069 $soxId = oxConfig::getParameter( "oxid");
00070 if (!$this->_allowAdminEdit($soxId))
00071 return;
00072
00073 return parent::deleteEntry();
00074 }
00075
00086 public function _prepareWhereQuery( $aWhere, $sqlFull )
00087 {
00088 $aNameWhere = null;
00089 if ( isset( $aWhere['oxuser.oxlname'] ) && ( $sName = $aWhere['oxuser.oxlname'] ) ) {
00090
00091 $blIsSearchValue = $this->_isSearchValue( $sName );
00092 $sName = $this->_processFilter( $sName );
00093 $aNameWhere['oxuser.oxfname'] = $aNameWhere['oxuser.oxlname'] = $sName;
00094
00095
00096 unset( $aWhere['oxuser.oxlname'] );
00097 }
00098 $sQ = parent::_prepareWhereQuery( $aWhere, $sqlFull );
00099
00100 if ( $aNameWhere ) {
00101
00102 $aVal = explode( ' ', $sName );
00103 $sQ .= ' and (';
00104 $sSqlBoolAction = '';
00105
00106 foreach ( $aNameWhere as $sFieldName => $sValue ) {
00107
00108
00109 foreach ( $aVal as $sVal ) {
00110
00111 $sQ .= " {$sSqlBoolAction} {$sFieldName} ";
00112
00113
00114 $sSqlBoolAction = ' or ';
00115
00116 $sQ .= $this->_buildFilter( $sVal, $blIsSearchValue );
00117
00118
00119
00120 $sUml = oxUtilsString::getInstance()->prepareStrForSearch( $sVal );
00121 if ( $sUml ) {
00122 $sQ .= " or {$sFieldName} ";
00123 $sQ .= $this->_buildFilter( $sUml, $blIsSearchValue );
00124 }
00125 }
00126 }
00127
00128
00129 $sQ .= ' ) ';
00130 }
00131
00132
00133 return $sQ;
00134 }
00135
00136 }