|
|
@@ -14,6 +14,7 @@ class BxOrgsGridAdministration extends BxBaseModGroupsGridAdministration
|
|
|
protected $_sFilter2Name;
|
|
|
protected $_sFilter2Value;
|
|
|
protected $_aFilter2Values;
|
|
|
+ protected $_sConfirmationType;
|
|
|
|
|
|
public function __construct ($aOptions, $oTemplate = false)
|
|
|
{
|
|
|
@@ -32,7 +33,10 @@ class BxOrgsGridAdministration extends BxBaseModGroupsGridAdministration
|
|
|
if(!empty($sFilter2)) {
|
|
|
$this->_sFilter2Value = bx_process_input($sFilter2);
|
|
|
$this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
|
|
|
- }
|
|
|
+ }
|
|
|
+ $this->_sConfirmationType = getParam('sys_account_confirmation_type');
|
|
|
+ if ($this->_sConfirmationType != BX_ACCOUNT_CONFIRMATION_NONE)
|
|
|
+ $this->_aFilter1Values['unconfirmed'] = $CNF['T']['filter_item_unconfirmed'];
|
|
|
}
|
|
|
|
|
|
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
|
|
|
@@ -40,8 +44,25 @@ class BxOrgsGridAdministration extends BxBaseModGroupsGridAdministration
|
|
|
if(strpos($sFilter, $this->_sParamsDivider) !== false)
|
|
|
list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
|
|
|
|
|
|
- if(!empty($this->_sFilter1Value))
|
|
|
- $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
|
|
|
+ if(!empty($this->_sFilter1Value)){
|
|
|
+ if ($this->_sFilter1Value == 'unconfirmed'){
|
|
|
+ switch ($this->_sConfirmationType) {
|
|
|
+ case BX_ACCOUNT_CONFIRMATION_EMAIL:
|
|
|
+ $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`email_confirmed` = 0 ");
|
|
|
+ break;
|
|
|
+ case BX_ACCOUNT_CONFIRMATION_PHONE:
|
|
|
+ $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`phone_confirmed` = 0 ");
|
|
|
+ break;
|
|
|
+ case BX_ACCOUNT_CONFIRMATION_EMAIL_PHONE:
|
|
|
+ $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND (`ta`.`email_confirmed` = 0 AND `ta`.`phone_confirmed` = 0) ");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if(!empty($this->_sFilter2Value)){
|
|
|
$iLevel = intval(str_replace("level", "", $this->_sFilter2Value));
|
|
|
if ($iLevel <> 3)
|