Changeset 12551 for extensions/UserAdvManager/branches/2.30/main.inc.php
- Timestamp:
- Nov 5, 2011, 3:48:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/branches/2.30/main.inc.php
r12272 r12551 2 2 /* 3 3 Plugin Name: UserAdvManager 4 Version: 2.30. 04 Version: 2.30.1 5 5 Description: Renforcer la gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216 … … 150 150 } 151 151 152 // Generic accounts exclusion (including Adult_Content generic users) 153 // ------------------------------------------------------------------ 154 $query =' 155 SELECT u.id 156 FROM '.USERS_TABLE.' AS u 157 INNER JOIN '.USER_INFOS_TABLE.' AS ui 158 ON u.id = ui.user_id 159 WHERE ui.status = "generic" 160 ;'; 161 162 $result = pwg_query($query); 163 164 while ($row = pwg_db_fetch_assoc($result)) 165 { 166 if (in_array($row['id'], $collection)) 167 { 168 array_push($page['errors'], l10n('UAM_Generic cannot be pwdreset')); 169 $errors = l10n('UAM_Generic cannot be pwdreset'); 170 } 171 } 172 173 // Admins accounts exclusion 174 // -------------------------- 175 $query =' 176 SELECT u.id 177 FROM '.USERS_TABLE.' AS u 178 INNER JOIN '.USER_INFOS_TABLE.' AS ui 179 ON u.id = ui.user_id 180 WHERE ui.status = "admin" 181 ;'; 182 183 $result = pwg_query($query); 184 185 while ($row = pwg_db_fetch_assoc($result)) 186 { 187 if (in_array($row['id'], $collection)) 188 { 189 array_push($page['errors'], l10n('UAM_Admins cannot be pwdreset')); 190 $errors = l10n('UAM_Admins cannot be pwdreset'); 191 } 192 } 193 194 $template->append('errors', $errors); 195 152 196 if (count($page['errors']) == 0) 153 { 197 { 154 198 if (isset($_POST['confirm_pwdreset']) and 1 == $_POST['confirm_pwdreset']) 155 199 { … … 182 226 } 183 227 } 184 } 228 } 185 229 $template->set_prefilter('user_list', 'UAM_PwdReset_Prefilter'); 186 230 }
Note: See TracChangeset
for help on using the changeset viewer.