Changeset 12314 for extensions/UserAdvManager/trunk/main.inc.php
- Timestamp:
- Oct 2, 2011, 7:14:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/main.inc.php
r12271 r12314 131 131 { 132 132 array_push($page['errors'], l10n('UAM_Guest cannot be pwdreset')); 133 $ template->append('errors', l10n('UAM_Guest cannot be pwdreset'));133 $errors = l10n('UAM_Guest cannot be pwdreset'); 134 134 } 135 135 if (($conf['guest_id'] != $conf['default_user_id']) and … … 137 137 { 138 138 array_push($page['errors'], l10n('UAM_Default user cannot be pwgreset')); 139 $ template->append('errors', l10n('UAM_Default user cannot be pwgreset'));139 $errors = l10n('UAM_Default user cannot be pwgreset'); 140 140 } 141 141 if (in_array($conf['webmaster_id'], $collection)) 142 142 { 143 143 array_push($page['errors'], l10n('UAM_Webmaster cannot be pwdreset')); 144 $ template->append('errors', l10n('UAM_Webmaster cannot be pwdreset'));144 $errors = l10n('UAM_Webmaster cannot be pwdreset'); 145 145 } 146 146 if (in_array($user['id'], $collection)) 147 147 { 148 148 array_push($page['errors'], l10n('UAM_You cannot pwdreset your account')); 149 $template->append('errors', l10n('UAM_You cannot pwdreset your account')); 150 } 149 $errors = l10n('UAM_You cannot pwdreset your account'); 150 } 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); 151 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 } 229 230 $page['order_by_items'] = array( 231 'id' => l10n('registration date'), 232 'username' => l10n('Username'), 233 'level' => l10n('Privacy level'), 234 'Language' => l10n('Language'), 235 'UAM_pwdreset' => l10n('UAM_PwdReset'), 236 ); 237 238 // Filter order options 239 $template->assign('order_options', $page['order_by_items']); 240 $template->assign('order_selected', 241 isset($_GET['order_by']) ? $_GET['order_by'] : ''); 242 185 243 $template->set_prefilter('user_list', 'UAM_PwdReset_Prefilter'); 186 244 }
Note: See TracChangeset
for help on using the changeset viewer.