Changeset 3896


Ignore:
Timestamp:
09/21/09 22:35:09 (10 years ago)
Author:
Eric
Message:

On Patricia's request (french forum), the unvalidated users management tab shows users according with the settings of unvalidated group and / or unvalidated status.

Location:
extensions/NBC_UserAdvManager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php

    r3881 r3896  
    384384  $conf_nbc_UserAdvManager_ConfirmMail = isset($conf['nbc_UserAdvManager_ConfirmMail']) ? explode(";" , $conf['nbc_UserAdvManager_ConfirmMail']) : array(); 
    385385         
    386   if (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2]=='true' and isset($conf_nbc_UserAdvManager[3]) and $conf_nbc_UserAdvManager[3] <> '-1' and isset($conf_nbc_UserAdvManager_ConfirmMail[0]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true') 
     386  if (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2]=='true' and ((isset($conf_nbc_UserAdvManager[3]) and $conf_nbc_UserAdvManager[3] <> '-1') or (isset($conf_nbc_UserAdvManager[9]) and $conf_nbc_UserAdvManager[9] <> '-1')) and isset($conf_nbc_UserAdvManager_ConfirmMail[0]) and $conf_nbc_UserAdvManager_ConfirmMail[0]=='true') 
    387387  { 
    388388// +-----------------------------------------------------------------------+ 
  • extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php

    r3881 r3896  
    616616   
    617617  $users = array(); 
    618      
     618 
    619619        /* search users depending expiration date */ 
    620620  $query = ' 
    621         SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
     621                SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 
    622622                                                                                u.'.$conf['user_fields']['username'].' AS username, 
    623                     u.'.$conf['user_fields']['email'].' AS email, 
    624                     ui.status, 
    625                     ui.adviser, 
    626                     ui.enabled_high, 
    627                     ui.level, 
    628                     ui.registration_date, 
    629                     ug.group_id 
     623                                                                                u.'.$conf['user_fields']['email'].' AS email, 
     624                                                                                ui.status, 
     625                                                                                ui.adviser, 
     626                                                                                ui.enabled_high, 
     627                                                                                ui.level, 
     628                                                                                ui.registration_date 
    630629                FROM '.USERS_TABLE.' AS u 
    631                 INNER JOIN '.USER_INFOS_TABLE.' AS ui 
    632                         ON u.'.$conf['user_fields']['id'].' = ui.user_id 
    633                 INNER JOIN '.USER_GROUP_TABLE.' AS ug 
    634         ON u.'.$conf['user_fields']['id'].' = ug.user_id 
    635         WHERE u.'.$conf['user_fields']['id'].' >= 0 
    636         AND ug.group_id = "'.$conf_nbc_UserAdvManager[3].'" 
    637       AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'" 
    638                                 OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'") 
    639                 ORDER BY id ASC 
    640         ;'; 
     630    INNER JOIN '.USER_INFOS_TABLE.' AS ui 
     631      ON u.'.$conf['user_fields']['id'].' = ui.user_id 
     632    LEFT JOIN '.USER_GROUP_TABLE.' AS ug 
     633      ON u.'.$conf['user_fields']['id'].' = ug.user_id 
     634                WHERE u.'.$conf['user_fields']['id'].' >= 3 
     635                AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'" 
     636                        OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_nbc_UserAdvManager_ConfirmMail[1].'")'; 
     637 
     638        if ($conf_nbc_UserAdvManager[3] <> '-1' and $conf_nbc_UserAdvManager[9] == '-1') 
     639  { 
     640    $query.= ' 
     641    AND ug.group_id = '.$conf_nbc_UserAdvManager[3]; 
     642  } 
     643  if ($conf_nbc_UserAdvManager[3] == '-1' and $conf_nbc_UserAdvManager[9] <> '-1') 
     644  { 
     645    $query.= ' 
     646    AND ui.status = \''.$conf_nbc_UserAdvManager[9]."'"; 
     647  } 
     648  if ($conf_nbc_UserAdvManager[3] <> '-1' and $conf_nbc_UserAdvManager[9] <> '-1') 
     649  { 
     650    $query.= ' 
     651    AND ug.group_id = \''.$conf_nbc_UserAdvManager[3]."'"; 
     652  } 
     653  $query.= ' 
     654  ORDER BY id ASC 
     655;'; 
    641656 
    642657        $result = pwg_query($query); 
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r3881 r3896  
    22/* 
    33Plugin Name: NBC UserAdvManager 
    4 Version: 2.11.2 
     4Version: 2.11.3 
    55Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management 
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 
     
    5858-- 2.11.2 : Bug fixed on bad query for unvalidated users display in unvalidated users list 
    5959                                                Bug fixed : Sql syntax error on plugin activation 
     60 
     61-- 2.11.3 : On Patricia's request (french forum), the unvalidated users management tab shows users according with the settings of unvalidated group and / or unvalidated status. 
     62                                                Improvement of unvalidated users management tab - Expired users are displayed in red color text. 
    6063 
    6164*/ 
Note: See TracChangeset for help on using the changeset viewer.