Changeset 21075
- Timestamp:
- Feb 28, 2013, 10:47:05 PM (11 years ago)
- Location:
- extensions/UserAdvManager/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/admin/UAM_admin.php
r20591 r21075 179 179 // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set) 180 180 // ---------------------------------------------------------------------------------- 181 if (isset($conf_UAM_ConfirmMail[ 0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_Text']) != 0)181 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_Text']) != 0) 182 182 { 183 183 $UAM_Illegal_Flag_Error1 = true; … … 187 187 // Save global UAM configuration 188 188 // ----------------------------- 189 $newconf_UAM = array( 190 $_POST['UAM_Mail_Info'], 191 $_POST['UAM_Confirm_Mail'], 192 (isset($_POST['UAM_No_Confirm_Group'])?$_POST['UAM_No_Confirm_Group']:''), 193 (isset($_POST['UAM_Validated_Group'])?$_POST['UAM_Validated_Group']:''), 194 (isset($_POST['UAM_Validated_Status'])?$_POST['UAM_Validated_Status']:''), 195 $_POST['UAM_Username_Char'], 196 $_POST['UAM_Username_List'], 197 (isset($_POST['UAM_No_Confirm_Status'])?$_POST['UAM_No_Confirm_Status']:''), 198 $_POST['UAM_MailInfo_Text'], 199 $_POST['UAM_ConfirmMail_Text'], 200 $_POST['UAM_MailExclusion'], 201 $_POST['UAM_MailExclusion_List'], 202 $_POST['UAM_Password_Enforced'], 203 $_POST['UAM_Password_Score'], 204 $_POST['UAM_AdminPassword_Enforced'], 205 $_POST['UAM_GhostUser_Tracker'], 206 $_POST['UAM_GhostTracker_DayLimit'], 207 $_POST['UAM_GhostTracker_ReminderText'], 208 $_POST['UAM_Add_LastVisit_Column'], 209 $_POST['UAM_Admin_ConfMail'], 210 $_POST['UAM_RedirToProfile'], 211 $_POST['UAM_GTAuto'], 212 $_POST['UAM_GTAutoMail'], 213 $_POST['UAM_GTAutoDelText'], 214 $_POST['UAM_GTAutoMailText'], 215 (isset($_POST['UAM_Downgrade_Group'])?$_POST['UAM_Downgrade_Group']:''), 216 (isset($_POST['UAM_Downgrade_Status'])?$_POST['UAM_Downgrade_Status']:''), 217 $_POST['UAM_AdminValidationMail_Text'], 218 $_POST['UAM_CustomPasswRetr'], 219 $_POST['UAM_CustomPasswRetr_Text'], 220 $_POST['UAM_USRAuto'], 221 $_POST['UAM_USRAutoDelText'], 222 $_POST['UAM_USRAutoMail'], 223 $_POST['UAM_Stuffs'], 224 $_POST['UAM_HidePassw'], 225 (isset($_POST['UAM_No_Valid_Level'])?$_POST['UAM_No_Valid_Level']:''), 226 (isset($_POST['UAM_Valid_Level'])?$_POST['UAM_Valid_Level']:''), 227 (isset($_POST['UAM_Downgrade_Level'])?$_POST['UAM_Downgrade_Level']:''), 228 $_POST['UAM_PwdReset'], 229 $_POST['UAM_RejectConnexion'], 230 $_POST['UAM_CustomRejectConnexion_Text'], 231 $_POST['UAM_ConfirmMail_Subject'], 232 $_POST['UAM_ConfirmMail_Remail_Subject'], 233 $_POST['UAM_InfoMail_Subject'], 234 $_POST['UAM_GTAutoMail_Subject'], 235 $_POST['UAM_GTReminder_Subject'], 236 $_POST['UAM_AdminValidationMail_Subject'], 237 ); 189 $newconf_UAM['MAIL_INFO'] = (isset($_POST['UAM_Mail_Info']) ? $_POST['UAM_Mail_Info'] : 'false'); 190 $newconf_UAM['CONFIRM_MAIL'] = (isset($_POST['UAM_Confirm_Mail']) ? $_POST['UAM_Confirm_Mail'] : 'false'); 191 $newconf_UAM['NO_CONFIRM_GROUP'] = (isset($_POST['UAM_No_Confirm_Group']) ? $_POST['UAM_No_Confirm_Group'] : ''); 192 $newconf_UAM['VALIDATED_GROUP'] = (isset($_POST['UAM_Validated_Group']) ? $_POST['UAM_Validated_Group'] : ''); 193 $newconf_UAM['VALIDATED_STATUS'] = (isset($_POST['UAM_Validated_Status'])?$_POST['UAM_Validated_Status'] : ''); 194 $newconf_UAM['USERNAME_CHAR'] = $_POST['UAM_Username_Char']; 195 $newconf_UAM['USERNAME_CHAR_LIST'] = (isset($_POST['UAM_Username_List']) ? $_POST['UAM_Username_List'] : ''); 196 $newconf_UAM['NO_CONFIRM_STATUS'] = (isset($_POST['UAM_No_Confirm_Status']) ? $_POST['UAM_No_Confirm_Status'] : ''); 197 $newconf_UAM['MAILINFO_TEXT'] = (isset($_POST['UAM_MailInfo_Text']) ? $_POST['UAM_MailInfo_Text'] : l10n('UAM_Default_InfoMail_Txt')); 198 $newconf_UAM['CONFIRMMAIL_TEXT'] = (isset($_POST['UAM_ConfirmMail_Text']) ? $_POST['UAM_ConfirmMail_Text'] : l10n('UAM_Default_ConfirmMail_Txt')); 199 $newconf_UAM['MAILEXCLUSION'] = (isset($_POST['UAM_MailExclusion']) ? $_POST['UAM_MailExclusion'] : 'false'); 200 $newconf_UAM['MAILEXCLUSION_LIST'] = (isset($_POST['UAM_MailExclusion_List']) ? $_POST['UAM_MailExclusion_List'] : ''); 201 $newconf_UAM['PASSWORDENF'] = (isset($_POST['UAM_Password_Enforced']) ? $_POST['UAM_Password_Enforced'] : 'false'); 202 $newconf_UAM['PASSWORD_SCORE'] = (isset($_POST['UAM_Password_Score']) ? $_POST['UAM_Password_Score'] : '100'); 203 $newconf_UAM['ADMINPASSWENF'] = (isset($_POST['UAM_AdminPassword_Enforced']) ? $_POST['UAM_AdminPassword_Enforced'] : 'false'); 204 $newconf_UAM['GHOSTRACKER'] = (isset($_POST['UAM_GhostUser_Tracker']) ? $_POST['UAM_GhostUser_Tracker'] : 'false'); 205 $newconf_UAM['GHOSTRACKER_DAYLIMIT'] = (isset($_POST['UAM_GhostTracker_DayLimit']) ? $_POST['UAM_GhostTracker_DayLimit'] : '10'); 206 $newconf_UAM['GHOSTRACKER_REMINDERTEXT'] = (isset($_POST['UAM_GhostTracker_ReminderText']) ? $_POST['UAM_GhostTracker_ReminderText'] : l10n('UAM_Default_GhstReminder_Txt')); 207 $newconf_UAM['ADDLASTVISIT'] = (isset($_POST['UAM_Add_LastVisit_Column']) ? $_POST['UAM_Add_LastVisit_Column'] : 'false'); 208 $newconf_UAM['ADMINCONFMAIL'] = (isset($_POST['UAM_Admin_ConfMail']) ? $_POST['UAM_Admin_ConfMail'] : 'false'); 209 $newconf_UAM['REDIRTOPROFILE'] = (isset($_POST['UAM_RedirToProfile']) ? $_POST['UAM_RedirToProfile'] : 'false'); 210 $newconf_UAM['GTAUTO'] = (isset($_POST['UAM_GTAuto']) ? $_POST['UAM_GTAuto'] : 'false'); 211 $newconf_UAM['GTAUTOMAIL'] = (isset($_POST['UAM_GTAutoMail']) ? $_POST['UAM_GTAutoMail'] : 'false'); 212 $newconf_UAM['GTAUTODEL'] = (isset($_POST['UAM_GTAutoDelText']) ? $_POST['UAM_GTAutoDelText'] : l10n('UAM_Default_GhstDeletion_Txt')); 213 $newconf_UAM['GTAUTOMAILTEXT'] = (isset($_POST['UAM_GTAutoMailText']) ? $_POST['UAM_GTAutoMailText'] : l10n('UAM_Default_GhstDemotion_Txt')); 214 $newconf_UAM['DOWNGRADE_GROUP'] = (isset($_POST['UAM_Downgrade_Group']) ? $_POST['UAM_Downgrade_Group'] : ''); 215 $newconf_UAM['DOWNGRADE_STATUS'] = (isset($_POST['UAM_Downgrade_Status']) ? $_POST['UAM_Downgrade_Status'] : ''); 216 $newconf_UAM['ADMINVALIDATIONMAIL'] = (isset($_POST['UAM_AdminValidationMail_Text']) ? $_POST['UAM_AdminValidationMail_Text'] : l10n('UAM_Default_AdminValidation_Txt')); 217 $newconf_UAM['CUSTOMPASSWRETR'] = (isset($_POST['UAM_CustomPasswRetr']) ? $_POST['UAM_CustomPasswRetr'] : 'false'); 218 $newconf_UAM['CUSTOMPASSWRETR_TEXT'] = (isset($_POST['UAM_CustomPasswRetr_Text']) ? $_POST['UAM_CustomPasswRetr_Text'] : l10n('UAM_Default_PwdRequest_Txt')); 219 $newconf_UAM['USRAUTO'] = (isset($_POST['UAM_USRAuto']) ? $_POST['UAM_USRAuto'] : 'false'); 220 $newconf_UAM['USRAUTODEL'] = (isset($_POST['UAM_USRAutoDelText']) ? $_POST['UAM_USRAutoDelText'] : l10n('UAM_Default_ValidationTimeout_Txt')); 221 $newconf_UAM['USRAUTOMAIL'] = (isset($_POST['UAM_USRAutoMail']) ? $_POST['UAM_USRAutoMail'] : 'false'); 222 $newconf_UAM['STUFFS'] = (isset($_POST['UAM_Stuffs']) ? $_POST['UAM_Stuffs'] : 'false'); 223 $newconf_UAM['HIDEPASSW'] = (isset($_POST['UAM_HidePassw']) ? $_POST['UAM_HidePassw'] : 'false'); 224 $newconf_UAM['NO_VALID_LEVEL'] = (isset($_POST['UAM_No_Valid_Level']) ? $_POST['UAM_No_Valid_Level'] : ''); 225 $newconf_UAM['VALID_LEVEL'] = (isset($_POST['UAM_Valid_Level']) ? $_POST['UAM_Valid_Level'] : ''); 226 $newconf_UAM['DOWNGRADE_LEVEL'] = (isset($_POST['UAM_Downgrade_Level']) ? $_POST['UAM_Downgrade_Level'] : ''); 227 $newconf_UAM['PWDRESET'] = (isset($_POST['UAM_PwdReset']) ? $_POST['UAM_PwdReset'] : 'false'); 228 $newconf_UAM['REJECTCONNECT'] = (isset($_POST['UAM_RejectConnexion']) ? $_POST['UAM_RejectConnexion'] : 'false'); 229 $newconf_UAM['REJECTCONNECT_TEXT'] = (isset($_POST['UAM_CustomRejectConnexion_Text']) ? $_POST['UAM_CustomRejectConnexion_Text'] : l10n('UAM_Default_RejectConnexion_Txt')); 230 $newconf_UAM['CONFIRMMAIL_SUBJECT'] = (isset($_POST['UAM_ConfirmMail_Subject']) ? $_POST['UAM_ConfirmMail_Subject'] : l10n('UAM_Default_ConfirmMail_Subject')); 231 $newconf_UAM['CONFIRMMAIL_REMAIL_SUBJECT'] = (isset($_POST['UAM_ConfirmMail_Remail_Subject']) ? $_POST['UAM_ConfirmMail_Remail_Subject'] : l10n('UAM_Default_ConfirmMail_Remail_Subject')); 232 $newconf_UAM['INFOMAIL_SUBJECT'] = (isset($_POST['UAM_InfoMail_Subject']) ? $_POST['UAM_InfoMail_Subject'] : l10n('UAM_Default_InfoMail_Subject')); 233 $newconf_UAM['GTAUTOMAIL_SUBJECT'] = (isset($_POST['UAM_GTAutoMail_Subject']) ? $_POST['UAM_GTAutoMail_Subject'] : l10n('UAM_Default_GTAutoMail_Subject')); 234 $newconf_UAM['GTREMINDER_SUBJECT'] = (isset($_POST['UAM_GTReminder_Subject']) ? $_POST['UAM_GTReminder_Subject'] : l10n('UAM_Default_GTReminder_Subject')); 235 $newconf_UAM['ADMINVALIDATIONMAIL_SUBJECT'] = (isset($_POST['UAM_AdminValidationMail_Subject']) ? $_POST['UAM_AdminValidationMail_Subject'] : l10n('UAM_Default_AdminValidationMail_Subject')); 238 236 239 237 $conf['UserAdvManager'] = serialize($newconf_UAM); 240 238 241 conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager'])); 239 conf_update_param('UserAdvManager', pwg_db_real_escape_string($conf['UserAdvManager'])); 242 240 243 241 // Email confirmation settings … … 253 251 // Check if [Kdays] flag is used in a legal way (ConfirmMail Time out have to be set) 254 252 // ---------------------------------------------------------------------------------- 255 if (isset($conf_UAM_ConfirmMail[ 0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt1']) == 1)253 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt1']) == 1) 256 254 { 257 255 $UAM_Illegal_Flag_Error2 = true; 258 256 array_push($page['errors'], l10n('UAM_Error_Using_illegal_flag')); 259 257 } 260 elseif (isset($conf_UAM_ConfirmMail[ 0]) and $conf_UAM_ConfirmMail[0] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt2']) == 1)258 elseif (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] == 'false' and preg_match('#\[Kdays\]#i',$_POST['UAM_ConfirmMail_ReMail_Txt2']) == 1) 261 259 { 262 260 $UAM_Illegal_Flag_Error3 = true; … … 266 264 // Save ConfirmMail settings 267 265 // ------------------------- 268 $newconf_UAM_ConfirmMail = array ( 269 $_POST['UAM_ConfirmMail_TimeOut'], 270 $_POST['UAM_ConfirmMail_Delay'], 271 $_POST['UAM_ConfirmMail_ReMail_Txt1'], 272 $_POST['UAM_ConfirmMail_Remail'], 273 $_POST['UAM_ConfirmMail_ReMail_Txt2'], 274 $_POST['UAM_ConfirmMail_Custom_Txt1'], 275 $_POST['UAM_ConfirmMail_Custom_Txt2'] 276 ); 266 $newconf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] = (isset($_POST['UAM_ConfirmMail_TimeOut']) ? $_POST['UAM_ConfirmMail_TimeOut'] : 'false'); 267 $newconf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'] = (isset($_POST['UAM_ConfirmMail_Delay']) ? $_POST['UAM_ConfirmMail_Delay'] : '5'); 268 $newconf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT1'] = (isset($_POST['UAM_ConfirmMail_ReMail_Txt1']) ? $_POST['UAM_ConfirmMail_ReMail_Txt1'] : l10n('UAM_Default_CfmMail_Remail_Txt1')); 269 $newconf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL'] = (isset($_POST['UAM_ConfirmMail_Remail']) ? $_POST['UAM_ConfirmMail_Remail'] : 'false'); 270 $newconf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT2'] = (isset($_POST['UAM_ConfirmMail_ReMail_Txt2']) ? $_POST['UAM_ConfirmMail_ReMail_Txt2'] : l10n('UAM_Default_CfmMail_Remail_Txt2')); 271 $newconf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT1'] = (isset($_POST['UAM_ConfirmMail_Custom_Txt1']) ? $_POST['UAM_ConfirmMail_Custom_Txt1'] : l10n('UAM_Default_CfmMail_Custom_Txt1')); 272 $newconf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT2'] = (isset($_POST['UAM_ConfirmMail_Custom_Txt2']) ? $_POST['UAM_ConfirmMail_Custom_Txt2'] : l10n('UAM_Default_CfmMail_Custom_Txt2')); 277 273 278 274 $conf['UserAdvManager_ConfirmMail'] = serialize($newconf_UAM_ConfirmMail); … … 363 359 $groups[$row['id']] = $row['name']; 364 360 //configuration value for unvalidated users 365 if (isset($conf_UAM[ 2]) and $conf_UAM[2] == $row['id'])361 if (isset($conf_UAM['NO_CONFIRM_GROUP']) and $conf_UAM['NO_CONFIRM_GROUP'] == $row['id']) 366 362 { 367 363 $No_Valid = $row['id']; 368 364 } 369 365 //configuration value for validated users 370 if (isset($conf_UAM[ 3]) and $conf_UAM[3] == $row['id'])366 if (isset($conf_UAM['VALIDATED_GROUP']) and $conf_UAM['VALIDATED_GROUP'] == $row['id']) 371 367 { 372 368 $Valid = $row['id']; 373 369 } 374 370 //configuration value for downgrade users 375 if (isset($conf_UAM[ 25]) and $conf_UAM[25] == $row['id'])371 if (isset($conf_UAM['DOWNGRADE_GROUP']) and $conf_UAM['DOWNGRADE_GROUP'] == $row['id']) 376 372 { 377 373 $Downgrade = $row['id']; … … 421 417 { 422 418 $status_options[$status] = l10n('user_status_'.$status); 423 if (isset($conf_UAM[ 7]) and $conf_UAM[7] == $status)419 if (isset($conf_UAM['NO_CONFIRM_STATUS']) and $conf_UAM['NO_CONFIRM_STATUS'] == $status) 424 420 { 425 421 $No_Valid_Status = $status; … … 442 438 { 443 439 $status_options[$status] = l10n('user_status_'.$status); 444 if (isset($conf_UAM[ 4]) and $conf_UAM[4] == $status)440 if (isset($conf_UAM['VALIDATED_STATUS']) and $conf_UAM['VALIDATED_STATUS'] == $status) 445 441 { 446 442 $Valid_Status = $status; … … 463 459 { 464 460 $status_options[$status] = l10n('user_status_'.$status); 465 if (isset($conf_UAM[ 26]) and $conf_UAM[26] == $status)461 if (isset($conf_UAM['DOWNGRADE_STATUS']) and $conf_UAM['DOWNGRADE_STATUS'] == $status) 466 462 { 467 463 $Downgrade_Status = $status; … … 492 488 { 493 489 $level_options[$level] = l10n(sprintf('Level %d', $level)); 494 if (isset($conf_UAM[ 35]) and $conf_UAM[35] == $level)490 if (isset($conf_UAM['NO_VALID_LEVEL']) and $conf_UAM['NO_VALID_LEVEL'] == $level) 495 491 { 496 492 $No_Valid_Level = $level; … … 513 509 { 514 510 $level_options[$level] = l10n(sprintf('Level %d', $level)); 515 if (isset($conf_UAM[ 36]) and $conf_UAM[36] == $level)511 if (isset($conf_UAM['VALID_LEVEL']) and $conf_UAM['VALID_LEVEL'] == $level) 516 512 { 517 513 $Valid_Level = $level; … … 534 530 { 535 531 $level_options[$level] = l10n(sprintf('Level %d', $level)); 536 if (isset($conf_UAM[ 37]) and $conf_UAM[37] == $level)532 if (isset($conf_UAM['DOWNGRADE_LEVEL']) and $conf_UAM['DOWNGRADE_LEVEL'] == $level) 537 533 { 538 534 $Downgrade_Level = $level; … … 578 574 'UAM_DUMP_DOWNLOAD' => $dump_download, 579 575 'UAM_THEME' => $UAM_theme, 580 'UAM_MAIL_INFO_TRUE' => $conf_UAM[ 0]=='true' ?'checked="checked"' : '' ,581 'UAM_MAIL_INFO_FALSE' => $conf_UAM[ 0]=='false' ?'checked="checked"' : '' ,582 'UAM_MAILINFO_TEXT' => $conf_UAM[ 8],583 'UAM_USERNAME_CHAR_TRUE' => $conf_UAM[ 5]=='true' ?'checked="checked"' : '' ,584 'UAM_USERNAME_CHAR_FALSE' => $conf_UAM[ 5]=='false' ?'checked="checked"' : '' ,585 'UAM_USERNAME_CHAR_LIST' => $conf_UAM[ 6],586 'UAM_CONFIRM_MAIL_TRUE' => $conf_UAM[ 1]=='true' ?'checked="checked"' : '' ,587 'UAM_CONFIRM_MAIL_FALSE' => $conf_UAM[ 1]=='false' ?'checked="checked"' : '' ,588 'UAM_CONFIRM_MAIL_LOCAL' => $conf_UAM[ 1]=='local' ?'checked="checked"' : '' ,589 'UAM_CONFIRMMAIL_TEXT' => $conf_UAM[ 9],590 'UAM_No_Confirm_Group' => $conf_UAM[ 2],591 'UAM_Validated_Group' => $conf_UAM[ 3],592 'UAM_No_Confirm_Status' => $conf_UAM[ 7],593 'UAM_Validated_Status' => $conf_UAM[ 4],594 'UAM_MAILEXCLUSION_TRUE' => $conf_UAM[ 10]=='true' ?'checked="checked"' : '' ,595 'UAM_MAILEXCLUSION_FALSE' => $conf_UAM[ 10]=='false' ?'checked="checked"' : '' ,596 'UAM_MAILEXCLUSION_LIST' => $conf_UAM[ 11],597 'UAM_PASSWORDENF_TRUE' => $conf_UAM[ 12]=='true' ?'checked="checked"' : '' ,598 'UAM_PASSWORDENF_FALSE' => $conf_UAM[ 12]=='false' ?'checked="checked"' : '' ,599 'UAM_PASSWORD_SCORE' => $conf_UAM[ 13],600 'UAM_ADMINPASSWENF_TRUE' => $conf_UAM[ 14]=='true' ?'checked="checked"' : '' ,601 'UAM_ADMINPASSWENF_FALSE' => $conf_UAM[ 14]=='false' ?'checked="checked"' : '' ,602 'UAM_GHOSTRACKER_TRUE' => $conf_UAM[ 15]=='true' ?'checked="checked"' : '' ,603 'UAM_GHOSTRACKER_FALSE' => $conf_UAM[ 15]=='false' ?'checked="checked"' : '' ,604 'UAM_GHOSTRACKER_DAYLIMIT' => $conf_UAM[ 16],605 'UAM_GHOSTRACKER_REMINDERTEXT' => $conf_UAM[ 17],606 'UAM_ADDLASTVISIT_TRUE' => $conf_UAM[ 18]=='true' ?'checked="checked"' : '' ,607 'UAM_ADDLASTVISIT_FALSE' => $conf_UAM[ 18]=='false' ?'checked="checked"' : '' ,608 'UAM_ADMINCONFMAIL_TRUE' => $conf_UAM[ 19]=='true' ?'checked="checked"' : '' ,609 'UAM_ADMINCONFMAIL_FALSE' => $conf_UAM[ 19]=='false' ?'checked="checked"' : '' ,610 'UAM_REDIRTOPROFILE_TRUE' => $conf_UAM[ 20]=='true' ?'checked="checked"' : '' ,611 'UAM_REDIRTOPROFILE_FALSE' => $conf_UAM[ 20]=='false' ?'checked="checked"' : '' ,612 'UAM_GTAUTO_TRUE' => $conf_UAM[ 21]=='true' ?'checked="checked"' : '' ,613 'UAM_GTAUTO_FALSE' => $conf_UAM[ 21]=='false' ?'checked="checked"' : '' ,614 'UAM_GTAUTOMAIL_TRUE' => $conf_UAM[ 22]=='true' ?'checked="checked"' : '' ,615 'UAM_GTAUTOMAIL_FALSE' => $conf_UAM[ 22]=='false' ?'checked="checked"' : '' ,616 'UAM_GTAUTODEL_TEXT' => $conf_UAM[ 23],617 'UAM_GTAUTOMAILTEXT' => $conf_UAM[ 24],618 'UAM_Downgrade_Group' => $conf_UAM[ 25],619 'UAM_Downgrade_Status' => $conf_UAM[ 26],620 'UAM_ADMINVALIDATIONMAIL_TEXT' => $conf_UAM[ 27],621 'UAM_CUSTOMPASSWRETR_TRUE' => $conf_UAM[ 28]=='true' ?'checked="checked"' : '' ,622 'UAM_CUSTOMPASSWRETR_FALSE' => $conf_UAM[ 28]=='false' ?'checked="checked"' : '' ,623 'UAM_CUSTOMPASSWRETR_TEXT' => $conf_UAM[ 29],624 'UAM_USRAUTO_TRUE' => $conf_UAM[ 30]=='true' ?'checked="checked"' : '' ,625 'UAM_USRAUTO_FALSE' => $conf_UAM[ 30]=='false' ?'checked="checked"' : '' ,626 'UAM_USRAUTODEL_TEXT' => $conf_UAM[ 31],627 'UAM_USRAUTOMAIL_TRUE' => $conf_UAM[ 32]=='true' ?'checked="checked"' : '' ,628 'UAM_USRAUTOMAIL_FALSE' => $conf_UAM[ 32]=='false' ?'checked="checked"' : '' ,629 'UAM_STUFFS_TRUE' => $conf_UAM[ 33]=='true' ?'checked="checked"' : '' ,630 'UAM_STUFFS_FALSE' => $conf_UAM[ 33]=='false' ?'checked="checked"' : '' ,631 'UAM_HIDEPASSW_TRUE' => $conf_UAM[ 34]=='true' ?'checked="checked"' : '' ,632 'UAM_HIDEPASSW_FALSE' => $conf_UAM[ 34]=='false' ?'checked="checked"' : '' ,633 'UAM_NO_VALID_LEVEL' => $conf_UAM[ 35],634 'UAM_VALID_LEVEL' => $conf_UAM[ 36],635 'UAM_DOWNGRADE_LEVEL' => $conf_UAM[ 37],636 'UAM_PWDRESET_TRUE' => $conf_UAM[ 38]=='true' ?'checked="checked"' : '' ,637 'UAM_PWDRESET_FALSE' => $conf_UAM[ 38]=='false' ?'checked="checked"' : '' ,638 'UAM_REJECTCONNECT_TRUE' => $conf_UAM[ 39]=='true' ?'checked="checked"' : '' ,639 'UAM_REJECTCONNECT_FALSE' => $conf_UAM[ 39]=='false' ?'checked="checked"' : '' ,640 'UAM_REJECTCONNECT_TEXT' => $conf_UAM[ 40],641 'UAM_CONFIRMMAIL_SUBJECT' => $conf_UAM[ 41],642 'UAM_CONFIRMMAIL_REMAIL_SUBJECT' => $conf_UAM[ 42],643 'UAM_INFOMAIL_SUBJECT' => $conf_UAM[ 43],644 'UAM_GTAUTOMAIL_SUBJECT' => $conf_UAM[ 44],645 'UAM_GTREMINDER_SUBJECT' => $conf_UAM[ 45],646 'UAM_ADMINVALIDATIONMAIL_SUBJECT' => $conf_UAM[ 46],576 'UAM_MAIL_INFO_TRUE' => $conf_UAM['MAIL_INFO']=='true' ? 'checked="checked"' : '' , 577 'UAM_MAIL_INFO_FALSE' => $conf_UAM['MAIL_INFO']=='false' ? 'checked="checked"' : '' , 578 'UAM_MAILINFO_TEXT' => $conf_UAM['MAILINFO_TEXT'], 579 'UAM_USERNAME_CHAR_TRUE' => $conf_UAM['USERNAME_CHAR']=='true' ? 'checked="checked"' : '' , 580 'UAM_USERNAME_CHAR_FALSE' => $conf_UAM['USERNAME_CHAR']=='false' ? 'checked="checked"' : '' , 581 'UAM_USERNAME_CHAR_LIST' => $conf_UAM['USERNAME_CHAR_LIST'], 582 'UAM_CONFIRM_MAIL_TRUE' => $conf_UAM['CONFIRM_MAIL']=='true' ? 'checked="checked"' : '' , 583 'UAM_CONFIRM_MAIL_FALSE' => $conf_UAM['CONFIRM_MAIL']=='false' ? 'checked="checked"' : '' , 584 'UAM_CONFIRM_MAIL_LOCAL' => $conf_UAM['CONFIRM_MAIL']=='local' ? 'checked="checked"' : '' , 585 'UAM_CONFIRMMAIL_TEXT' => $conf_UAM['CONFIRMMAIL_TEXT'], 586 'UAM_No_Confirm_Group' => $conf_UAM['NO_CONFIRM_GROUP'], 587 'UAM_Validated_Group' => $conf_UAM['VALIDATED_GROUP'], 588 'UAM_No_Confirm_Status' => $conf_UAM['NO_CONFIRM_STATUS'], 589 'UAM_Validated_Status' => $conf_UAM['VALIDATED_STATUS'], 590 'UAM_MAILEXCLUSION_TRUE' => $conf_UAM['MAILEXCLUSION']=='true' ? 'checked="checked"' : '' , 591 'UAM_MAILEXCLUSION_FALSE' => $conf_UAM['MAILEXCLUSION']=='false' ? 'checked="checked"' : '' , 592 'UAM_MAILEXCLUSION_LIST' => $conf_UAM['MAILEXCLUSION_LIST'], 593 'UAM_PASSWORDENF_TRUE' => $conf_UAM['PASSWORDENF']=='true' ? 'checked="checked"' : '' , 594 'UAM_PASSWORDENF_FALSE' => $conf_UAM['PASSWORDENF']=='false' ? 'checked="checked"' : '' , 595 'UAM_PASSWORD_SCORE' => $conf_UAM['PASSWORD_SCORE'], 596 'UAM_ADMINPASSWENF_TRUE' => $conf_UAM['ADMINPASSWENF']=='true' ? 'checked="checked"' : '' , 597 'UAM_ADMINPASSWENF_FALSE' => $conf_UAM['ADMINPASSWENF']=='false' ? 'checked="checked"' : '' , 598 'UAM_GHOSTRACKER_TRUE' => $conf_UAM['GHOSTRACKER']=='true' ? 'checked="checked"' : '' , 599 'UAM_GHOSTRACKER_FALSE' => $conf_UAM['GHOSTRACKER']=='false' ? 'checked="checked"' : '' , 600 'UAM_GHOSTRACKER_DAYLIMIT' => $conf_UAM['GHOSTRACKER_DAYLIMIT'], 601 'UAM_GHOSTRACKER_REMINDERTEXT' => $conf_UAM['GHOSTRACKER_REMINDERTEXT'], 602 'UAM_ADDLASTVISIT_TRUE' => $conf_UAM['ADDLASTVISIT']=='true' ? 'checked="checked"' : '' , 603 'UAM_ADDLASTVISIT_FALSE' => $conf_UAM['ADDLASTVISIT']=='false' ? 'checked="checked"' : '' , 604 'UAM_ADMINCONFMAIL_TRUE' => $conf_UAM['ADMINCONFMAIL']=='true' ? 'checked="checked"' : '' , 605 'UAM_ADMINCONFMAIL_FALSE' => $conf_UAM['ADMINCONFMAIL']=='false' ? 'checked="checked"' : '' , 606 'UAM_REDIRTOPROFILE_TRUE' => $conf_UAM['REDIRTOPROFILE']=='true' ? 'checked="checked"' : '' , 607 'UAM_REDIRTOPROFILE_FALSE' => $conf_UAM['REDIRTOPROFILE']=='false' ? 'checked="checked"' : '' , 608 'UAM_GTAUTO_TRUE' => $conf_UAM['GTAUTO']=='true' ? 'checked="checked"' : '' , 609 'UAM_GTAUTO_FALSE' => $conf_UAM['GTAUTO']=='false' ? 'checked="checked"' : '' , 610 'UAM_GTAUTOMAIL_TRUE' => $conf_UAM['GTAUTOMAIL']=='true' ? 'checked="checked"' : '' , 611 'UAM_GTAUTOMAIL_FALSE' => $conf_UAM['GTAUTOMAIL']=='false' ? 'checked="checked"' : '' , 612 'UAM_GTAUTODEL_TEXT' => $conf_UAM['GTAUTODEL'], 613 'UAM_GTAUTOMAILTEXT' => $conf_UAM['GTAUTOMAILTEXT'], 614 'UAM_Downgrade_Group' => $conf_UAM['DOWNGRADE_GROUP'], 615 'UAM_Downgrade_Status' => $conf_UAM['DOWNGRADE_STATUS'], 616 'UAM_ADMINVALIDATIONMAIL_TEXT' => $conf_UAM['ADMINVALIDATIONMAIL'], 617 'UAM_CUSTOMPASSWRETR_TRUE' => $conf_UAM['CUSTOMPASSWRETR']=='true' ? 'checked="checked"' : '' , 618 'UAM_CUSTOMPASSWRETR_FALSE' => $conf_UAM['CUSTOMPASSWRETR']=='false' ? 'checked="checked"' : '' , 619 'UAM_CUSTOMPASSWRETR_TEXT' => $conf_UAM['CUSTOMPASSWRETR_TEXT'], 620 'UAM_USRAUTO_TRUE' => $conf_UAM['USRAUTO']=='true' ? 'checked="checked"' : '' , 621 'UAM_USRAUTO_FALSE' => $conf_UAM['USRAUTO']=='false' ? 'checked="checked"' : '' , 622 'UAM_USRAUTODEL_TEXT' => $conf_UAM['USRAUTODEL'], 623 'UAM_USRAUTOMAIL_TRUE' => $conf_UAM['USRAUTOMAIL']=='true' ? 'checked="checked"' : '' , 624 'UAM_USRAUTOMAIL_FALSE' => $conf_UAM['USRAUTOMAIL']=='false' ? 'checked="checked"' : '' , 625 'UAM_STUFFS_TRUE' => $conf_UAM['STUFFS']=='true' ? 'checked="checked"' : '' , 626 'UAM_STUFFS_FALSE' => $conf_UAM['STUFFS']=='false' ? 'checked="checked"' : '' , 627 'UAM_HIDEPASSW_TRUE' => $conf_UAM['HIDEPASSW']=='true' ? 'checked="checked"' : '' , 628 'UAM_HIDEPASSW_FALSE' => $conf_UAM['HIDEPASSW']=='false' ? 'checked="checked"' : '' , 629 'UAM_NO_VALID_LEVEL' => $conf_UAM['NO_VALID_LEVEL'], 630 'UAM_VALID_LEVEL' => $conf_UAM['VALID_LEVEL'], 631 'UAM_DOWNGRADE_LEVEL' => $conf_UAM['DOWNGRADE_LEVEL'], 632 'UAM_PWDRESET_TRUE' => $conf_UAM['PWDRESET']=='true' ? 'checked="checked"' : '' , 633 'UAM_PWDRESET_FALSE' => $conf_UAM['PWDRESET']=='false' ? 'checked="checked"' : '' , 634 'UAM_REJECTCONNECT_TRUE' => $conf_UAM['REJECTCONNECT']=='true' ? 'checked="checked"' : '' , 635 'UAM_REJECTCONNECT_FALSE' => $conf_UAM['REJECTCONNECT']=='false' ? 'checked="checked"' : '' , 636 'UAM_REJECTCONNECT_TEXT' => $conf_UAM['REJECTCONNECT_TEXT'], 637 'UAM_CONFIRMMAIL_SUBJECT' => $conf_UAM['CONFIRMMAIL_SUBJECT'], 638 'UAM_CONFIRMMAIL_REMAIL_SUBJECT' => $conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT'], 639 'UAM_INFOMAIL_SUBJECT' => $conf_UAM['INFOMAIL_SUBJECT'], 640 'UAM_GTAUTOMAIL_SUBJECT' => $conf_UAM['GTAUTOMAIL_SUBJECT'], 641 'UAM_GTREMINDER_SUBJECT' => $conf_UAM['GTREMINDER_SUBJECT'], 642 'UAM_ADMINVALIDATIONMAIL_SUBJECT' => $conf_UAM['ADMINVALIDATIONMAIL_SUBJECT'], 647 643 'UAM_PASSWORD_TEST_SCORE' => $UAM_Password_Test_Score, 648 644 'UAM_ERROR_REPORTS1' => $UAM_Exclusionlist_Error, … … 651 647 'UAM_ERROR_REPORTS4' => $UAM_Illegal_Flag_Error3, 652 648 'UAM_EMAIL_MANDATORY' => $UAM_Email_Mandatory_Check, 653 'UAM_CONFIRMMAIL_TIMEOUT_TRUE' => $conf_UAM_ConfirmMail[ 0]=='true' ?'checked="checked"' : '' ,654 'UAM_CONFIRMMAIL_TIMEOUT_FALSE' => $conf_UAM_ConfirmMail[ 0]=='false' ?'checked="checked"' : '' ,655 'UAM_CONFIRMMAIL_DELAY' => $conf_UAM_ConfirmMail[ 1],656 'UAM_CONFIRMMAIL_REMAIL_TRUE' => $conf_UAM_ConfirmMail[ 3]=='true' ? 'checked="checked"' : '',657 'UAM_CONFIRMMAIL_REMAIL_FALSE' => $conf_UAM_ConfirmMail[ 3]=='false' ? 'checked="checked"' : '',658 'UAM_CONFIRMMAIL_REMAIL_TXT1' => $conf_UAM_ConfirmMail[ 2],659 'UAM_CONFIRMMAIL_REMAIL_TXT2' => $conf_UAM_ConfirmMail[ 4],660 'UAM_CONFIRMMAIL_CUSTOM_TXT1' => $conf_UAM_ConfirmMail[ 5],661 'UAM_CONFIRMMAIL_CUSTOM_TXT2' => $conf_UAM_ConfirmMail[ 6],649 'UAM_CONFIRMMAIL_TIMEOUT_TRUE' => $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']=='true' ? 'checked="checked"' : '' , 650 'UAM_CONFIRMMAIL_TIMEOUT_FALSE' => $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']=='false' ? 'checked="checked"' : '' , 651 'UAM_CONFIRMMAIL_DELAY' => $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'], 652 'UAM_CONFIRMMAIL_REMAIL_TRUE' => $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL']=='true' ? 'checked="checked"' : '', 653 'UAM_CONFIRMMAIL_REMAIL_FALSE' => $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL']=='false' ? 'checked="checked"' : '', 654 'UAM_CONFIRMMAIL_REMAIL_TXT1' => $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT1'], 655 'UAM_CONFIRMMAIL_REMAIL_TXT2' => $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT2'], 656 'UAM_CONFIRMMAIL_CUSTOM_TXT1' => $conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT1'], 657 'UAM_CONFIRMMAIL_CUSTOM_TXT2' => $conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT2'], 662 658 ) 663 659 ); … … 669 665 // Username without forbidden keys 670 666 // ------------------------------- 671 if ( isset($conf_UAM[ 5]) and $conf_UAM[5] == 'true' )667 if ( isset($conf_UAM['USERNAME_CHAR']) and $conf_UAM['USERNAME_CHAR'] == 'true' ) 672 668 { 673 669 $query = ' … … 689 685 // Email without forbidden domain 690 686 // ------------------------------ 691 if ( isset($conf_UAM[ 10]) and $conf_UAM[10] == 'true' )687 if ( isset($conf_UAM['MAILEXCLUSION']) and $conf_UAM['MAILEXCLUSION'] == 'true' ) 692 688 { 693 689 $query = ' … … 700 696 while($row = pwg_db_fetch_assoc($result)) 701 697 { 702 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[ 11]);698 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM['MAILEXCLUSION_LIST']); 703 699 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) 704 700 { … … 755 751 $conf_UAM = unserialize($conf['UserAdvManager']); 756 752 757 if (isset($conf_UAM[ 18]) and $conf_UAM[18]=='true')753 if (isset($conf_UAM['ADDLASTVISIT']) and $conf_UAM['ADDLASTVISIT']=='true') 758 754 { 759 755 // +-----------------------------------------------------------------------+ … … 805 801 $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days 806 802 807 if (isset($conf_UAM[ 15]) and $conf_UAM[15]=='true' and !empty($conf_UAM[16]))803 if (isset($conf_UAM['GHOSTRACKER']) and $conf_UAM['GHOSTRACKER']=='true' and !empty($conf_UAM['GHOSTRACKER_DAYLIMIT'])) 808 804 { 809 if ($deltadays <= ($conf_UAM[ 16]/2))805 if ($deltadays <= ($conf_UAM['GHOSTRACKER_DAYLIMIT']/2)) 810 806 { 811 807 $display = 'green'; 812 808 } 813 809 814 if (($deltadays > ($conf_UAM[ 16]/2)) and ($deltadays < $conf_UAM[16]))810 if (($deltadays > ($conf_UAM['GHOSTRACKER_DAYLIMIT']/2)) and ($deltadays < $conf_UAM['GHOSTRACKER_DAYLIMIT'])) 815 811 { 816 812 $display = 'orange'; 817 813 } 818 814 819 if ($deltadays >= $conf_UAM[ 16])815 if ($deltadays >= $conf_UAM['GHOSTRACKER_DAYLIMIT']) 820 816 { 821 817 $display = 'red'; … … 885 881 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 886 882 887 if (isset($conf_UAM[ 1]) and ($conf_UAM[1]=='true' or $conf_UAM[1]=='local'))883 if (isset($conf_UAM['CONFIRM_MAIL']) and ($conf_UAM['CONFIRM_MAIL']=='true' or $conf_UAM['CONFIRM_MAIL']=='local')) 888 884 { 889 885 // +-----------------------------------------------------------------------+ … … 1351 1347 $Confirm_Local = ""; 1352 1348 1353 if ($conf_UAM[ 1] == 'local')1354 { 1355 $Confirm_Local = $conf_UAM[ 1];1349 if ($conf_UAM['CONFIRM_MAIL'] == 'local') 1350 { 1351 $Confirm_Local = $conf_UAM['CONFIRM_MAIL']; 1356 1352 } 1357 1353 else … … 1404 1400 $conf_UAM = unserialize($conf['UserAdvManager']); 1405 1401 1406 if (isset($conf_UAM[ 16]) and $conf_UAM[15]=='true')1402 if (isset($conf_UAM['GHOSTRACKER_DAYLIMIT']) and $conf_UAM['GHOSTRACKER']=='true') 1407 1403 { 1408 1404 // +-----------------------------------------------------------------------+ -
extensions/UserAdvManager/trunk/changelog.txt.php
r20703 r21075 376 376 Update tr_TR, thanks to : hakanselcuk 377 377 378 -- 2.50.0 : Compliance with Piwigo 2.5 379 Bug 2764 fixed - Code refactory : Change config variables to assoc array and $_POST vars control before writing conf in database - Thx to flop25 for his advices ;-) 380 Update fr_FR 381 Update de_DE, thanks to : stephy 382 Update tr_TR, thanks to : hakanselcuk and LazBoy 383 Update it_IT, thanks to : Ericnet 384 378 385 */ 379 386 ?> -
extensions/UserAdvManager/trunk/include/functions.inc.php
r20703 r21075 40 40 41 41 // Check mandatory email address for email exclusion 42 if (!$conf['obligatory_user_mail_address'] and $conf_UAM[ 10] == 'true')42 if (!$conf['obligatory_user_mail_address'] and $conf_UAM['MAILEXCLUSION'] == 'true') 43 43 { 44 44 array_push($page['warnings'], l10n('UAM_mail_exclusion_error')); … … 64 64 if (!is_admin() and !is_a_guest() and $user['username'] != "16" and $user['username'] != "18") 65 65 { 66 if ((isset($conf_UAM[ 15]) and $conf_UAM[15] == 'true') or (isset($conf_UAM[18]) and $conf_UAM[18] == 'true'))66 if ((isset($conf_UAM['GHOSTRACKER']) and $conf_UAM['GHOSTRACKER'] == 'true') or (isset($conf_UAM['ADDLASTVISIT']) and $conf_UAM['ADDLASTVISIT'] == 'true')) 67 67 { 68 68 $userid = get_userid($user['username']); … … 103 103 104 104 // Perform user logout after registration if not validated 105 if ((isset($conf_UAM[ 39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster() )105 if ((isset($conf_UAM['REJECTCONNECT']) and $conf_UAM['REJECTCONNECT'] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster() ) 106 106 { 107 107 invalidate_user_cache(); … … 141 141 //Bug 2829 fix not working - if (isset($page['page']) and ($page['page'] != 'user_list')) 142 142 //{ 143 if (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'local')143 if (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'local') 144 144 { 145 145 // This is to set user to "waiting" group or status and without ConfirMail until admin validation … … 157 157 // Sending registration confirmation by email 158 158 // ------------------------------------------ 159 elseif (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'true')160 { 161 if (is_admin() and isset($conf_UAM[ 19]) and $conf_UAM[19] == 'true')159 elseif (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true') 160 { 161 if (is_admin() and isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'true') 162 162 { 163 163 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 164 164 } 165 elseif (is_admin() and isset($conf_UAM[ 19]) and $conf_UAM[19] == 'false')165 elseif (is_admin() and isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'false') 166 166 { 167 167 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); … … 217 217 // Password enforcement control 218 218 // ---------------------------- 219 if (isset($conf_UAM[ 12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13]))219 if (isset($conf_UAM['PASSWORDENF']) and $conf_UAM['PASSWORDENF'] == 'true' and !empty($conf_UAM['PASSWORD_SCORE'])) 220 220 { 221 221 if (!empty($user['password']) and !is_admin()) … … 223 223 $PasswordCheck = testpassword($user['password']); 224 224 225 if ($PasswordCheck < $conf_UAM[ 13])225 if ($PasswordCheck < $conf_UAM['PASSWORD_SCORE']) 226 226 { 227 227 $message = get_l10n_args('UAM_reg_err_login4_%s', $PasswordCheck); 228 $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[ 13];228 $lang['reg_err_pass'] = l10n_args($message).$conf_UAM['PASSWORD_SCORE']; 229 229 array_push($errors, $lang['reg_err_pass']); 230 230 } 231 231 } 232 else if (!empty($user['password']) and is_admin() and isset($conf_UAM[ 14]) and $conf_UAM[14] == 'true')232 else if (!empty($user['password']) and is_admin() and isset($conf_UAM['ADMINPASSWENF']) and $conf_UAM['ADMINPASSWENF'] == 'true') 233 233 { 234 234 $PasswordCheck = testpassword($user['password']); 235 235 236 if ($PasswordCheck < $conf_UAM[ 13])236 if ($PasswordCheck < $conf_UAM['PASSWORD_SCORE']) 237 237 { 238 238 $message = get_l10n_args('UAM_reg_err_login4_%s', $PasswordCheck); 239 $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[ 13];239 $lang['reg_err_pass'] = l10n_args($message).$conf_UAM['PASSWORD_SCORE']; 240 240 array_push($errors, $lang['reg_err_pass']); 241 241 } … … 245 245 // Username without forbidden keys 246 246 // ------------------------------- 247 if (isset($conf_UAM[ 5]) and $conf_UAM[5] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin())248 { 249 $lang['reg_err_login1'] = l10n('UAM_reg_err_login2')."'".$conf_UAM[ 6]."'";247 if (isset($conf_UAM['USERNAME_CHAR']) and $conf_UAM['USERNAME_CHAR'] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin()) 248 { 249 $lang['reg_err_login1'] = l10n('UAM_reg_err_login2')."'".$conf_UAM['USERNAME_CHAR_LIST']."'"; 250 250 array_push($errors, $lang['reg_err_login1']); 251 251 } … … 253 253 // Email without forbidden domains 254 254 // ------------------------------- 255 if (isset($conf_UAM[ 10]) and $conf_UAM[10] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin())256 { 257 $lang['reg_err_login1'] = l10n('UAM_reg_err_login5')."'".$conf_UAM[ 11]."'";255 if (isset($conf_UAM['MAILEXCLUSION']) and $conf_UAM['MAILEXCLUSION'] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin()) 256 { 257 $lang['reg_err_login1'] = l10n('UAM_reg_err_login5')."'".$conf_UAM['MAILEXCLUSION_LIST']."'"; 258 258 array_push($errors, $lang['reg_err_login1']); 259 259 } … … 274 274 // Update first redirection parameter 275 275 // ---------------------------------- 276 if ((isset($conf_UAM[ 20]) and $conf_UAM[20] == 'true'))276 if ((isset($conf_UAM['REDIRTOPROFILE']) and $conf_UAM['REDIRTOPROFILE'] == 'true')) 277 277 { 278 278 $user_idsOK = array(); … … 292 292 // Special message display for password reset 293 293 // ------------------------------------------ 294 if ((isset($conf_UAM[ 38]) and $conf_UAM[38] == 'true'))294 if ((isset($conf_UAM['PWDRESET']) and $conf_UAM['PWDRESET'] == 'true')) 295 295 { 296 296 if (UAM_check_pwgreset($user['id'])) … … 306 306 // Email without forbidden domains 307 307 // ------------------------------- 308 if (isset($conf_UAM[ 10]) and $conf_UAM[10] == 'true' and !empty($_POST['mail_address']))308 if (isset($conf_UAM['MAILEXCLUSION']) and $conf_UAM['MAILEXCLUSION'] == 'true' and !empty($_POST['mail_address'])) 309 309 { 310 310 if (ValidateEmailProvider($_POST['mail_address'])) 311 311 { 312 $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM[ 11]."'");312 $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM['MAILEXCLUSION_LIST']."'"); 313 313 unset($_POST['validate']); 314 314 } … … 317 317 // Password reset control 318 318 // ---------------------- 319 if (isset($conf_UAM[ 38]) and $conf_UAM[38] == 'true' and UAM_check_pwgreset($user['id']))319 if (isset($conf_UAM['PWDRESET']) and $conf_UAM['PWDRESET'] == 'true' and UAM_check_pwgreset($user['id'])) 320 320 { 321 321 // if password not changed then pwdreset field = true else pwdreset field = false … … 341 341 // Password enforcement control 342 342 // ---------------------------- 343 if (isset($conf_UAM[ 12]) and $conf_UAM[12] == 'true' and !empty($conf_UAM[13]))343 if (isset($conf_UAM['PASSWORDENF']) and $conf_UAM['PASSWORDENF'] == 'true' and !empty($conf_UAM['PASSWORD_SCORE'])) 344 344 { 345 345 $PasswordCheck = testpassword($_POST['use_new_pwd']); 346 346 347 if ($PasswordCheck < $conf_UAM[ 13])347 if ($PasswordCheck < $conf_UAM['PASSWORD_SCORE']) 348 348 { 349 349 $message = get_l10n_args('UAM_reg_err_login4_%s', $PasswordCheck); 350 $template->append('errors', l10n_args($message).$conf_UAM[ 13]);350 $template->append('errors', l10n_args($message).$conf_UAM['PASSWORD_SCORE']); 351 351 unset($_POST['use_new_pwd']); 352 352 unset($_POST['validate']); … … 357 357 // Sending registration confirmation by email 358 358 // ------------------------------------------ 359 if ((isset($conf_UAM[ 1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local'))359 if ((isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true') or (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'local')) 360 360 { 361 361 $confirm_mail_need = false; … … 373 373 // This is to send a new validation key 374 374 // ------------------------------------ 375 if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'true'))375 if ($_POST['mail_address'] != $current_email and (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true')) 376 376 { 377 377 SetPermission($user['id']);// Set to "waiting" group or status until user validation … … 382 382 // This is to set the user to "waiting" group or status until admin validation 383 383 // --------------------------------------------------------------------------- 384 elseif ($_POST['mail_address'] != $current_email and (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'local'))384 elseif ($_POST['mail_address'] != $current_email and (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'local')) 385 385 { 386 386 SetPermission($user['id']);// Set to "waiting" group or status until admin validation … … 390 390 } 391 391 392 if (((!empty($_POST['use_new_pwd']) and (isset($conf_UAM[ 0]) and $conf_UAM[0] == 'true')) or $confirm_mail_need))392 if (((!empty($_POST['use_new_pwd']) and (isset($conf_UAM['MAIL_INFO']) and $conf_UAM['MAIL_INFO'] == 'true')) or $confirm_mail_need)) 393 393 { 394 394 $query = ' … … 423 423 // Performing GhostTracker scheduled tasks 424 424 // --------------------------------------- 425 if ((isset($conf_UAM[ 21]) and $conf_UAM[21] == 'true'))425 if ((isset($conf_UAM['GTAUTO']) and $conf_UAM['GTAUTO'] == 'true')) 426 426 { 427 427 UAM_GT_ScheduledTasks(); … … 430 430 // Performing User validation scheduled tasks 431 431 // ------------------------------------------ 432 if ((isset($conf_UAM[ 30]) and $conf_UAM[30] == 'true'))432 if ((isset($conf_UAM['USRAUTO']) and $conf_UAM['USRAUTO'] == 'true')) 433 433 { 434 434 UAM_USR_ScheduledTasks(); … … 436 436 437 437 // Avoid login into public galleries until registration confirmation is done 438 if ((isset($conf_UAM[ 39]) and $conf_UAM[39] == 'false') or ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and UAM_UsrReg_Verif($user['id'])) or (!is_admin() and !is_webmaster()))438 if ((isset($conf_UAM['REJECTCONNECT']) and $conf_UAM['REJECTCONNECT'] == 'false') or ((isset($conf_UAM['REJECTCONNECT']) and $conf_UAM['REJECTCONNECT'] == 'true') and UAM_UsrReg_Verif($user['id'])) or (!is_admin() and !is_webmaster())) 439 439 { 440 440 // Performing redirection to profile page on first login 441 441 // ----------------------------------------------------- 442 if ((isset($conf_UAM[ 20]) and $conf_UAM[20] == 'true'))442 if ((isset($conf_UAM['REDIRTOPROFILE']) and $conf_UAM['REDIRTOPROFILE'] == 'true')) 443 443 { 444 444 $query =' … … 459 459 // Performing redirection to profile page for password reset 460 460 // --------------------------------------------------------- 461 if ((isset($conf_UAM[ 38]) and $conf_UAM[38] == 'true'))461 if ((isset($conf_UAM['PWDRESET']) and $conf_UAM['PWDRESET'] == 'true')) 462 462 { 463 463 $query =' … … 477 477 } 478 478 } 479 elseif ((isset($conf_UAM[ 39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster())479 elseif ((isset($conf_UAM['REJECTCONNECT']) and $conf_UAM['REJECTCONNECT'] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster()) 480 480 { 481 481 // Logged-in user cleanup, session destruction and redirected to custom page … … 543 543 // Auto group, status or privacy level downgrade and autodeletion if user already reminded 544 544 // --------------------------------------------------------------------------------------- 545 if ((isset($conf_UAM[ 21]) and $conf_UAM[21] == 'true') and ((isset($conf_UAM[25]) and $conf_UAM[25] <> -1) or (isset($conf_UAM[26]) and $conf_UAM[26] <> -1) or (isset($conf_UAM[37]) and $conf_UAM[37] <> -1)))545 if ((isset($conf_UAM['GTAUTO']) and $conf_UAM['GTAUTO'] == 'true') and ((isset($conf_UAM['DOWNGRADE_GROUP']) and $conf_UAM['DOWNGRADE_GROUP'] <> -1) or (isset($conf_UAM['DOWNGRADE_STATUS']) and $conf_UAM['DOWNGRADE_STATUS'] <> -1) or (isset($conf_UAM['DOWNGRADE_LEVEL']) and $conf_UAM['DOWNGRADE_LEVEL'] <> -1))) 546 546 { 547 547 if (count($collection) > 0) … … 625 625 // Delete user from all groups 626 626 // --------------------------- 627 if ($conf_UAM[ 2] <> -1 and $conf_UAM[3] <> -1)627 if ($conf_UAM['NO_CONFIRM_GROUP'] <> -1 and $conf_UAM['VALIDATED_GROUP'] <> -1) 628 628 { 629 629 $query = ' … … 631 631 WHERE user_id = '.$user_id.' 632 632 AND ( 633 group_id = '.$conf_UAM[ 2].'633 group_id = '.$conf_UAM['NO_CONFIRM_GROUP'].' 634 634 OR 635 group_id = '.$conf_UAM[ 3].'635 group_id = '.$conf_UAM['VALIDATED_GROUP'].' 636 636 ) 637 637 ;'; … … 641 641 // Change user status 642 642 // ------------------ 643 if ($conf_UAM[ 26] <> -1)643 if ($conf_UAM['DOWNGRADE_STATUS'] <> -1) 644 644 { 645 645 $query = ' 646 646 UPDATE '.USER_INFOS_TABLE.' 647 SET status = "'.$conf_UAM[ 26].'"647 SET status = "'.$conf_UAM['DOWNGRADE_STATUS'].'" 648 648 WHERE user_id = '.$user_id.' 649 649 ;'; … … 653 653 // Change user group 654 654 // ----------------- 655 if ($conf_UAM[ 25] <> -1)655 if ($conf_UAM['DOWNGRADE_GROUP'] <> -1) 656 656 { 657 657 $query = ' … … 659 659 (user_id, group_id) 660 660 VALUES 661 ('.$user_id.', "'.$conf_UAM[ 25].'")661 ('.$user_id.', "'.$conf_UAM['DOWNGRADE_GROUP'].'") 662 662 ;'; 663 663 pwg_query($query); … … 666 666 // Change user privacy level 667 667 // ------------------------- 668 if ($conf_UAM[ 37] <> -1)668 if ($conf_UAM['DOWNGRADE_LEVEL'] <> -1) 669 669 { 670 670 $query = ' 671 671 UPDATE '.USER_INFOS_TABLE.' 672 SET level = "'.$conf_UAM[ 37].'"672 SET level = "'.$conf_UAM['DOWNGRADE_LEVEL'].'" 673 673 WHERE user_id = '.$user_id.' 674 674 ;'; … … 678 678 // Auto send email notification on group / status downgrade 679 679 // -------------------------------------------------------- 680 if (isset($conf_UAM[ 22]) and $conf_UAM[22] == 'true')680 if (isset($conf_UAM['GTAUTOMAIL']) and $conf_UAM['GTAUTOMAIL'] == 'true') 681 681 { 682 682 // Set reminder true … … 754 754 // Unvalidated accounts auto email sending and autodeletion if user already reminded 755 755 // --------------------------------------------------------------------------------- 756 if ((isset($conf_UAM[ 30]) and $conf_UAM[30] == 'true'))756 if ((isset($conf_UAM['USRAUTO']) and $conf_UAM['USRAUTO'] == 'true')) 757 757 { 758 758 if (count($collection) > 0) … … 782 782 // If never reminded before, send reminder and set reminder True 783 783 // ------------------------------------------------------------- 784 if (!$reminder and isset($conf_UAM[ 32]) and $conf_UAM[32] == 'true')784 if (!$reminder and isset($conf_UAM['USRAUTOMAIL']) and $conf_UAM['USRAUTOMAIL'] == 'true') 785 785 { 786 786 $typemail = 1; … … 836 836 // If never reminded before, send reminder and set reminder True 837 837 // ------------------------------------------------------------- 838 if (!$reminder and isset($conf_UAM[ 32]) and $conf_UAM[32] == 'true')838 if (!$reminder and isset($conf_UAM['USRAUTOMAIL']) and $conf_UAM['USRAUTOMAIL'] == 'true') 839 839 { 840 840 $typemail = 1; … … 884 884 // Email without forbidden domains 885 885 // ------------------------------- 886 if (isset($conf_UAM[ 10]) and $conf_UAM[10] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email']))887 { 888 $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM[ 11]."'");886 if (isset($conf_UAM['MAILEXCLUSION']) and $conf_UAM['MAILEXCLUSION'] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email'])) 887 { 888 $template->append('errors', l10n('UAM_reg_err_login5')."'".$conf_UAM['MAILEXCLUSION_LIST']."'"); 889 889 unset($_POST['submit_add']); 890 890 } … … 915 915 916 916 // Connexion rejected until validation 917 if (isset($conf_UAM[ 40]) and !empty($conf_UAM[40]) and $_GET['UAM_msg']=="rejected")917 if (isset($conf_UAM['REJECTCONNECT_TEXT']) and !empty($conf_UAM['REJECTCONNECT_TEXT']) and $_GET['UAM_msg']=="rejected") 918 918 { 919 919 // Management of Extension flags ([mygallery], [myurl]) … … 926 926 if (function_exists('get_user_language_desc')) 927 927 { 928 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 40]));929 } 930 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 40]));928 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['REJECTCONNECT_TEXT'])); 929 } 930 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM['REJECTCONNECT_TEXT'])); 931 931 932 932 $page["errors"][]=$custom_text; … … 934 934 935 935 // User account deleted after validation deadline - Triggered by any other user 936 elseif (isset($conf_UAM[ 23]) and !empty($conf_UAM[23]) and $_GET['UAM_msg']=="deleted")936 elseif (isset($conf_UAM['GTAUTODEL']) and !empty($conf_UAM['GTAUTODEL']) and $_GET['UAM_msg']=="deleted") 937 937 { 938 938 // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here … … 945 945 if (function_exists('get_user_language_desc')) 946 946 { 947 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 23]));948 } 949 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 23]));947 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['GTAUTODEL'])); 948 } 949 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM['GTAUTODEL'])); 950 950 951 951 $page["errors"][]=$custom_text; … … 953 953 954 954 // User account deleted after validation deadline - Triggered by user himself 955 elseif (isset($conf_UAM[ 31]) and !empty($conf_UAM[31]) and $_GET['UAM_msg']=="deleted")955 elseif (isset($conf_UAM['USRAUTODEL']) and !empty($conf_UAM['USRAUTODEL']) and $_GET['UAM_msg']=="deleted") 956 956 { 957 957 // Management of Extension flags ([mygallery], [myurl]) - [username] flag can't be used here … … 964 964 if (function_exists('get_user_language_desc')) 965 965 { 966 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 31]));967 } 968 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 31]));966 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['USRAUTODEL'])); 967 } 968 else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM['USRAUTODEL'])); 969 969 970 970 $page["errors"][]=$custom_text; … … 1000 1000 if (VerifyConfirmMail($key)) 1001 1001 { 1002 if (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'local')1002 if (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'local') 1003 1003 { 1004 1004 validation_mail($userid); … … 1030 1030 } 1031 1031 1032 if (isset($conf_UAM_ConfirmMail[ 5]) and !empty($conf_UAM_ConfirmMail[5]))1032 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT1']) and !empty($conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT1'])) 1033 1033 { 1034 1034 // Management of Extension flags ([username], [mygallery], [myurl]) … … 1043 1043 if (function_exists('get_user_language_desc')) 1044 1044 { 1045 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 5]));1045 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT1'])); 1046 1046 } 1047 1047 else 1048 1048 { 1049 $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 5]));1049 $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT1'])); 1050 1050 } 1051 1051 $page['infos'][]=$custom_text; … … 1054 1054 else 1055 1055 { 1056 if (isset($conf_UAM_ConfirmMail[ 6]) and !empty($conf_UAM_ConfirmMail[6]))1056 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT2']) and !empty($conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT2'])) 1057 1057 { 1058 1058 // Management of Extension flags ([username], [mygallery], [myurl]) … … 1067 1067 if (function_exists('get_user_language_desc')) 1068 1068 { 1069 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 6]));1069 $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT2'])); 1070 1070 } 1071 1071 else 1072 1072 { 1073 $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 6]));1073 $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_CUSTOM_TXT2'])); 1074 1074 } 1075 1075 … … 1100 1100 $conf_UAM = unserialize($conf['UserAdvManager']); 1101 1101 1102 if (isset($conf_UAM[ 28]) and $conf_UAM[28] == 'true')1102 if (isset($conf_UAM['CUSTOMPASSWRETR']) and $conf_UAM['CUSTOMPASSWRETR'] == 'true') 1103 1103 { 1104 1104 // Management of Extension flags ([mygallery], [myurl]) … … 1108 1108 $replacements[] = get_gallery_home_url(); 1109 1109 1110 $infos = preg_replace($patterns, $replacements, $conf_UAM[ 29])."\n"."\n".$infos;1110 $infos = preg_replace($patterns, $replacements, $conf_UAM['CUSTOMPASSWRETR_TEXT'])."\n"."\n".$infos; 1111 1111 } 1112 1112 return $infos; … … 1162 1162 { 1163 1163 case 1: // Confirmation email on user registration - Without information email (already managed by Piwigo) 1164 if (isset($conf_UAM[ 41]) and !empty($conf_UAM[41]))1164 if (isset($conf_UAM['CONFIRMMAIL_SUBJECT']) and !empty($conf_UAM['CONFIRMMAIL_SUBJECT'])) 1165 1165 { 1166 1166 // Management of Extension flags ([username], [mygallery]) … … 1173 1173 if (function_exists('get_user_language_desc')) 1174 1174 { 1175 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 41]))."\n\n";1176 } 1177 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 41]))."\n\n";1175 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_SUBJECT']))."\n\n"; 1176 } 1177 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_SUBJECT']))."\n\n"; 1178 1178 } 1179 1179 … … 1181 1181 1182 1182 case 2: // Confirmation email on user profile update - With information email if modification done in user profile 1183 if (isset($conf_UAM[ 41]) and !empty($conf_UAM[41]))1183 if (isset($conf_UAM['CONFIRMMAIL_SUBJECT']) and !empty($conf_UAM['CONFIRMMAIL_SUBJECT'])) 1184 1184 { 1185 1185 // Management of Extension flags ([username], [mygallery]) … … 1192 1192 if (function_exists('get_user_language_desc')) 1193 1193 { 1194 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 41]))."\n\n";1195 } 1196 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 41]))."\n\n";1194 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_SUBJECT']))."\n\n"; 1195 } 1196 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_SUBJECT']))."\n\n"; 1197 1197 } 1198 1198 1199 1199 $password = !empty($password) ? $password : l10n('UAM_empty_pwd'); 1200 1200 1201 if (isset($conf_UAM[ 8]) and !empty($conf_UAM[8]))1201 if (isset($conf_UAM['MAILINFO_TEXT']) and !empty($conf_UAM['MAILINFO_TEXT'])) 1202 1202 { 1203 1203 // Management of Extension flags ([username], [mygallery], [myurl]) … … 1212 1212 if (function_exists('get_user_language_desc')) 1213 1213 { 1214 $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 8]))."\n\n";1215 } 1216 else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 8]))."\n\n";1217 } 1218 1219 if (isset($conf_UAM[ 0]) and $conf_UAM[0] == 'true')1220 { 1221 if (isset($conf_UAM[ 34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email1214 $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['MAILINFO_TEXT']))."\n\n"; 1215 } 1216 else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM['MAILINFO_TEXT']))."\n\n"; 1217 } 1218 1219 if (isset($conf_UAM['MAIL_INFO']) and $conf_UAM['MAIL_INFO'] == 'true') 1220 { 1221 if (isset($conf_UAM['HIDEPASSW']) and $conf_UAM['HIDEPASSW'] == 'true') // Allow display of clear password in email 1222 1222 { 1223 1223 $infos1 = array( … … 1243 1243 1244 1244 case 3: // Only information email send to user if checked 1245 if (isset($conf_UAM[ 43]) and !empty($conf_UAM[43]))1245 if (isset($conf_UAM['INFOMAIL_SUBJECT']) and !empty($conf_UAM['INFOMAIL_SUBJECT'])) 1246 1246 { 1247 1247 // Management of Extension flags ([username], [mygallery]) … … 1254 1254 if (function_exists('get_user_language_desc')) 1255 1255 { 1256 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 43]))."\n\n";1257 } 1258 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 43]))."\n\n";1256 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['INFOMAIL_SUBJECT']))."\n\n"; 1257 } 1258 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['INFOMAIL_SUBJECT']))."\n\n"; 1259 1259 } 1260 1260 1261 1261 $password = !empty($password) ? $password : l10n('UAM_no_update_pwd'); 1262 1262 1263 if (isset($conf_UAM[ 8]) and !empty($conf_UAM[8]))1263 if (isset($conf_UAM['MAILINFO_TEXT']) and !empty($conf_UAM['MAILINFO_TEXT'])) 1264 1264 { 1265 1265 // Management of Extension flags ([username], [mygallery], [myurl]) … … 1274 1274 if (function_exists('get_user_language_desc')) 1275 1275 { 1276 $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 8]))."\n\n";1277 } 1278 else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 8]))."\n\n";1279 } 1280 1281 if (isset($conf_UAM[ 0]) and $conf_UAM[0] == 'true')1282 { 1283 if (isset($conf_UAM[ 34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email1276 $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['MAILINFO_TEXT']))."\n\n"; 1277 } 1278 else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM['MAILINFO_TEXT']))."\n\n"; 1279 } 1280 1281 if (isset($conf_UAM['MAIL_INFO']) and $conf_UAM['MAIL_INFO'] == 'true') 1282 { 1283 if (isset($conf_UAM['HIDEPASSW']) and $conf_UAM['HIDEPASSW'] == 'true') // Allow display of clear password in email 1284 1284 { 1285 1285 $infos1 = array( … … 1305 1305 } 1306 1306 1307 if (isset($conf_UAM[ 1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and $confirm) // Add confirmation link ?1307 if (isset($conf_UAM['CONFIRM_MAIL']) and ($conf_UAM['CONFIRM_MAIL'] == 'true' or $conf_UAM['CONFIRM_MAIL'] == 'local') and $confirm) // Add confirmation link ? 1308 1308 { 1309 1309 $infos2 = array( … … 1312 1312 ); 1313 1313 1314 if (isset($conf_UAM[ 9]) and !empty($conf_UAM[9])) // Add personal text in confirmation email ?1314 if (isset($conf_UAM['CONFIRMMAIL_TEXT']) and !empty($conf_UAM['CONFIRMMAIL_TEXT'])) // Add personal text in confirmation email ? 1315 1315 { 1316 1316 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) … … 1323 1323 $replacements[] = get_gallery_home_url(); 1324 1324 1325 if (isset($conf_UAM_ConfirmMail[ 0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active1325 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] == 'true') // [Kdays] replacement only if related option is active 1326 1326 { 1327 1327 $patterns[] = '#\[Kdays\]#i'; 1328 $replacements[] = $conf_UAM_ConfirmMail[ 1];1328 $replacements[] = $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY']; 1329 1329 } 1330 1330 1331 1331 if (function_exists('get_user_language_desc')) 1332 1332 { 1333 $infos2_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 9]))."\n\n";1334 } 1335 else $infos2_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 9]))."\n\n";1333 $infos2_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_TEXT']))."\n\n"; 1334 } 1335 else $infos2_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_TEXT']))."\n\n"; 1336 1336 } 1337 1337 } … … 1339 1339 // Sending the email with subject and contents 1340 1340 // ------------------------------------------- 1341 if (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'local')1341 if (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'local') 1342 1342 { 1343 1343 switch_lang_to(get_default_language()); … … 1470 1470 { 1471 1471 case 1: //Generating email content for remind with a new key 1472 if (isset($conf_UAM[ 42]) and !empty($conf_UAM[42]))1472 if (isset($conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT']) and !empty($conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT'])) 1473 1473 { 1474 1474 // Management of Extension flags ([username], [mygallery]) … … 1481 1481 if (function_exists('get_user_language_desc')) 1482 1482 { 1483 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 42]))."\n\n";1484 } 1485 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 42]))."\n\n";1486 } 1487 1488 if (isset($conf_UAM_ConfirmMail[ 2]) and !empty($conf_UAM_ConfirmMail[2]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm)1483 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT']))."\n\n"; 1484 } 1485 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT']))."\n\n"; 1486 } 1487 1488 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT1']) and !empty($conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT1']) and isset($conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL'] == 'true' and $confirm) 1489 1489 { 1490 1490 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) … … 1497 1497 $replacements[] = get_gallery_home_url(); 1498 1498 1499 if (isset($conf_UAM_ConfirmMail[ 0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active1499 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] == 'true') // [Kdays] replacement only if related option is active 1500 1500 { 1501 1501 $patterns[] = '#\[Kdays\]#i'; 1502 $replacements[] = $conf_UAM_ConfirmMail[ 1];1502 $replacements[] = $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY']; 1503 1503 } 1504 1504 1505 1505 if (function_exists('get_user_language_desc')) 1506 1506 { 1507 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 2]))."\n\n";1508 } 1509 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 2]))."\n\n";1507 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT1']))."\n\n"; 1508 } 1509 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT1']))."\n\n"; 1510 1510 1511 1511 $infos2 = array … … 1528 1528 1529 1529 case 2: //Generating email content for remind without a new key 1530 if (isset($conf_UAM[ 42]) and !empty($conf_UAM[42]))1530 if (isset($conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT']) and !empty($conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT'])) 1531 1531 { 1532 1532 // Management of Extension flags ([username], [mygallery]) … … 1539 1539 if (function_exists('get_user_language_desc')) 1540 1540 { 1541 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 42]))."\n\n";1542 } 1543 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 42]))."\n\n";1544 } 1545 1546 if (isset($conf_UAM_ConfirmMail[ 4]) and !empty($conf_UAM_ConfirmMail[4]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm)1541 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT']))."\n\n"; 1542 } 1543 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['CONFIRMMAIL_REMAIL_SUBJECT']))."\n\n"; 1544 } 1545 1546 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT2']) and !empty($conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT2']) and isset($conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL'] == 'true' and !$confirm) 1547 1547 { 1548 1548 // Management of Extension flags ([username], [mygallery], [myurl], [Kdays]) … … 1555 1555 $replacements[] = get_gallery_home_url(); 1556 1556 1557 if (isset($conf_UAM_ConfirmMail[ 0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active1557 if (isset($conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT']) and $conf_UAM_ConfirmMail['CONFIRMMAIL_TIMEOUT'] == 'true') // [Kdays] replacement only if related option is active 1558 1558 { 1559 1559 $patterns[] = '#\[Kdays\]#i'; 1560 $replacements[] = $conf_UAM_ConfirmMail[ 1];1560 $replacements[] = $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY']; 1561 1561 } 1562 1562 1563 1563 if (function_exists('get_user_language_desc')) 1564 1564 { 1565 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 4]))."\n\n";1566 } 1567 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[ 4]))."\n\n";1565 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT2']))."\n\n"; 1566 } 1567 else $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail['CONFIRMMAIL_REMAIL_TXT2']))."\n\n"; 1568 1568 } 1569 1569 … … 1622 1622 load_language('plugin.lang', UAM_PATH); 1623 1623 1624 if (isset($conf_UAM[ 45]) and !empty($conf_UAM[45]))1624 if (isset($conf_UAM['GTREMINDER_SUBJECT']) and !empty($conf_UAM['GTREMINDER_SUBJECT'])) 1625 1625 { 1626 1626 // Management of Extension flags ([username], [mygallery]) … … 1633 1633 if (function_exists('get_user_language_desc')) 1634 1634 { 1635 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 45]))."\n\n";1636 } 1637 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 45]))."\n\n";1638 } 1639 1640 if (isset($conf_UAM[ 17]) and !empty($conf_UAM[17]) and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')1635 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['GTREMINDER_SUBJECT']))."\n\n"; 1636 } 1637 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['GTREMINDER_SUBJECT']))."\n\n"; 1638 } 1639 1640 if (isset($conf_UAM['GHOSTRACKER_REMINDERTEXT']) and !empty($conf_UAM['GHOSTRACKER_REMINDERTEXT']) and isset($conf_UAM['GHOSTRACKER']) and $conf_UAM['GHOSTRACKER'] == 'true') 1641 1641 { 1642 1642 // Management of Extension flags ([username], [mygallery], [myurl], [days]) … … 1649 1649 $replacements[] = get_gallery_home_url(); 1650 1650 $patterns[] = '#\[days\]#i'; 1651 $replacements[] = $conf_UAM[ 16];1651 $replacements[] = $conf_UAM['GHOSTRACKER_DAYLIMIT']; 1652 1652 1653 1653 if (function_exists('get_user_language_desc')) 1654 1654 { 1655 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 17]))."\n\n";1655 $infos1 = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['GHOSTRACKER_REMINDERTEXT']))."\n\n"; 1656 1656 } 1657 1657 else 1658 1658 { 1659 $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 17]))."\n\n";1659 $infos1 = l10n(preg_replace($patterns, $replacements, $conf_UAM['GHOSTRACKER_REMINDERTEXT']))."\n\n"; 1660 1660 } 1661 1661 … … 1719 1719 } 1720 1720 1721 if (isset($conf_UAM[ 44]) and !empty($conf_UAM[44]))1721 if (isset($conf_UAM['GTAUTOMAIL_SUBJECT']) and !empty($conf_UAM['GTAUTOMAIL_SUBJECT'])) 1722 1722 { 1723 1723 // Management of Extension flags ([username], [mygallery]) … … 1730 1730 if (function_exists('get_user_language_desc')) 1731 1731 { 1732 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 44]))."\n\n";1733 } 1734 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 44]))."\n\n";1735 } 1736 1737 if (isset($conf_UAM[ 24]) and !empty($conf_UAM[24]))1732 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['GTAUTOMAIL_SUBJECT']))."\n\n"; 1733 } 1734 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['GTAUTOMAIL_SUBJECT']))."\n\n"; 1735 } 1736 1737 if (isset($conf_UAM['GTAUTOMAILTEXT']) and !empty($conf_UAM['GTAUTOMAILTEXT'])) 1738 1738 { 1739 1739 // Management of Extension flags ([username], [mygallery], [myurl]) … … 1748 1748 if (function_exists('get_user_language_desc')) 1749 1749 { 1750 $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 24]))."\n\n";1751 } 1752 else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 24]))."\n\n";1750 $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['GTAUTOMAILTEXT']))."\n\n"; 1751 } 1752 else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM['GTAUTOMAILTEXT']))."\n\n"; 1753 1753 } 1754 1754 … … 1835 1835 $result = pwg_db_fetch_assoc(pwg_query($query)); 1836 1836 1837 if (isset($conf_UAM[ 46]) and !empty($conf_UAM[46]))1837 if (isset($conf_UAM['ADMINVALIDATIONMAIL_SUBJECT']) and !empty($conf_UAM['ADMINVALIDATIONMAIL_SUBJECT'])) 1838 1838 { 1839 1839 // Management of Extension flags ([username], [mygallery]) … … 1846 1846 if (function_exists('get_user_language_desc')) 1847 1847 { 1848 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 46]))."\n\n";1849 } 1850 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 46]))."\n\n";1851 } 1852 1853 if (isset($conf_UAM[ 27]) and !empty($conf_UAM[27]))1848 $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['ADMINVALIDATIONMAIL_SUBJECT']))."\n\n"; 1849 } 1850 else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM['ADMINVALIDATIONMAIL_SUBJECT']))."\n\n"; 1851 } 1852 1853 if (isset($conf_UAM['ADMINVALIDATIONMAIL']) and !empty($conf_UAM['ADMINVALIDATIONMAIL'])) 1854 1854 { 1855 1855 // Management of Extension flags ([username], [mygallery], [myurl]) … … 1863 1863 if (function_exists('get_user_language_desc')) 1864 1864 { 1865 $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[ 27]))."\n\n";1866 } 1867 else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM[ 27]))."\n\n";1865 $custom_txt = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM['ADMINVALIDATIONMAIL']))."\n\n"; 1866 } 1867 else $custom_txt = l10n(preg_replace($patterns, $replacements, $conf_UAM['ADMINVALIDATIONMAIL']))."\n\n"; 1868 1868 } 1869 1869 … … 1952 1952 WHERE user_id = '.$user_id.' 1953 1953 AND ( 1954 group_id = '.$conf_UAM[ 2].'1954 group_id = '.$conf_UAM['NO_CONFIRM_GROUP'].' 1955 1955 OR 1956 group_id = '.$conf_UAM[ 3].'1956 group_id = '.$conf_UAM['VALIDATED_GROUP'].' 1957 1957 ) 1958 1958 ;'; … … 1962 1962 // Set user unvalidated status 1963 1963 // --------------------------- 1964 if (!is_admin() and $conf_UAM[ 7] <> -1)1964 if (!is_admin() and $conf_UAM['NO_CONFIRM_STATUS'] <> -1) 1965 1965 { 1966 1966 $query = ' 1967 1967 UPDATE '.USER_INFOS_TABLE.' 1968 SET status = "'.$conf_UAM[ 7].'"1968 SET status = "'.$conf_UAM['NO_CONFIRM_STATUS'].'" 1969 1969 WHERE user_id = '.$user_id.' 1970 1970 ;'; … … 1975 1975 // Set user unvalidated group 1976 1976 // -------------------------- 1977 if (!is_admin() and $conf_UAM[ 2] <> -1)1977 if (!is_admin() and $conf_UAM['NO_CONFIRM_GROUP'] <> -1) 1978 1978 { 1979 1979 $query = ' … … 1981 1981 (user_id, group_id) 1982 1982 VALUES 1983 ('.$user_id.', '.$conf_UAM[ 2].')1983 ('.$user_id.', '.$conf_UAM['NO_CONFIRM_GROUP'].') 1984 1984 ;'; 1985 1985 … … 1989 1989 // Set user unvalidated privacy level 1990 1990 // ---------------------------------- 1991 if (!is_admin() and $conf_UAM[ 35] <> -1)1991 if (!is_admin() and $conf_UAM['NO_VALID_LEVEL'] <> -1) 1992 1992 { 1993 1993 $query = ' 1994 1994 UPDATE '.USER_INFOS_TABLE.' 1995 SET level = "'.$conf_UAM[ 35].'"1995 SET level = "'.$conf_UAM['NO_VALID_LEVEL'].'" 1996 1996 WHERE user_id = '.$user_id.' 1997 1997 ;'; … … 2035 2035 WHERE user_id = '.$user_id.' 2036 2036 AND ( 2037 group_id = '.$conf_UAM[ 2].'2037 group_id = '.$conf_UAM['NO_CONFIRM_GROUP'].' 2038 2038 OR 2039 group_id = '.$conf_UAM[ 3].'2039 group_id = '.$conf_UAM['VALIDATED_GROUP'].' 2040 2040 ) 2041 2041 ;'; … … 2043 2043 pwg_query($query); 2044 2044 2045 if (!is_admin() and $conf_UAM[ 7] <> -1) // Set status2045 if (!is_admin() and $conf_UAM['NO_CONFIRM_STATUS'] <> -1) // Set status 2046 2046 { 2047 2047 $query = ' 2048 2048 UPDATE '.USER_INFOS_TABLE.' 2049 SET status = "'.$conf_UAM[ 7].'"2049 SET status = "'.$conf_UAM['NO_CONFIRM_STATUS'].'" 2050 2050 WHERE user_id = '.$user_id.' 2051 2051 ;'; … … 2054 2054 } 2055 2055 2056 if (!is_admin() and $conf_UAM[ 2] <> -1) // Set group2056 if (!is_admin() and $conf_UAM['NO_CONFIRM_GROUP'] <> -1) // Set group 2057 2057 { 2058 2058 $query = ' … … 2060 2060 (user_id, group_id) 2061 2061 VALUES 2062 ('.$user_id.', '.$conf_UAM[ 2].')2062 ('.$user_id.', '.$conf_UAM['NO_CONFIRM_GROUP'].') 2063 2063 ;'; 2064 2064 … … 2066 2066 } 2067 2067 2068 if (!is_admin() and $conf_UAM[ 35] <> -1) // Set privacy level2068 if (!is_admin() and $conf_UAM['NO_VALID_LEVEL'] <> -1) // Set privacy level 2069 2069 { 2070 2070 $query = ' … … 2072 2072 (user_id, level) 2073 2073 VALUES 2074 ('.$user_id.', "'.$conf_UAM[ 35].'")2074 ('.$user_id.', "'.$conf_UAM['NO_VALID_LEVEL'].'") 2075 2075 ;'; 2076 2076 … … 2261 2261 // Verify Confirmmail with time limit ON 2262 2262 // ------------------------------------- 2263 if (isset ($conf_UAM_ConfirmMail[ 1]))2263 if (isset ($conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'])) 2264 2264 { 2265 2265 // Dates formating and compare … … 2278 2278 // Condition with the value set for time limit 2279 2279 // ------------------------------------------- 2280 if ($deltadays <= $conf_UAM_ConfirmMail[ 1]) // If Nb of days is less than the limit set2280 if ($deltadays <= $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY']) // If Nb of days is less than the limit set 2281 2281 { 2282 2282 $dbnow = date("Y-m-d H:i:s"); … … 2301 2301 pwg_query($query); 2302 2302 2303 if ($conf_UAM[ 2] <> -1) // Delete user from unvalidated users group2303 if ($conf_UAM['NO_CONFIRM_GROUP'] <> -1) // Delete user from unvalidated users group 2304 2304 { 2305 2305 $query = ' 2306 2306 DELETE FROM '.USER_GROUP_TABLE.' 2307 2307 WHERE user_id = '.$data['user_id'].' 2308 AND group_id = '.$conf_UAM[ 2].'2308 AND group_id = '.$conf_UAM['NO_CONFIRM_GROUP'].' 2309 2309 ;'; 2310 2310 pwg_query($query); 2311 2311 } 2312 2312 2313 if ($conf_UAM[ 3] <> -1) // Add user to validated users group2313 if ($conf_UAM['VALIDATED_GROUP'] <> -1) // Add user to validated users group 2314 2314 { 2315 2315 $query = ' … … 2317 2317 (user_id, group_id) 2318 2318 VALUES 2319 ('.$data['user_id'].', '.$conf_UAM[ 3].')2319 ('.$data['user_id'].', '.$conf_UAM['VALIDATED_GROUP'].') 2320 2320 ;'; 2321 2321 pwg_query($query); 2322 2322 } 2323 2323 2324 if ($conf_UAM[ 4] <> -1) // Change user's status2324 if ($conf_UAM['VALIDATED_STATUS'] <> -1) // Change user's status 2325 2325 { 2326 2326 $query = ' 2327 2327 UPDATE '.USER_INFOS_TABLE.' 2328 SET status = "'.$conf_UAM[ 4].'"2328 SET status = "'.$conf_UAM['VALIDATED_STATUS'].'" 2329 2329 WHERE user_id = '.$data['user_id'].' 2330 2330 ;'; … … 2332 2332 } 2333 2333 2334 if ($conf_UAM[ 36] <> -1) // Change user's privacy level2334 if ($conf_UAM['VALID_LEVEL'] <> -1) // Change user's privacy level 2335 2335 { 2336 2336 $query = ' 2337 2337 UPDATE '.USER_INFOS_TABLE.' 2338 SET level = "'.$conf_UAM[ 36].'"2338 SET level = "'.$conf_UAM['VALID_LEVEL'].'" 2339 2339 WHERE user_id = '.$data['user_id'].' 2340 2340 ;'; … … 2356 2356 return true; 2357 2357 } 2358 elseif ($deltadays > $conf_UAM_ConfirmMail[ 1]) // If timelimit exeeds2358 elseif ($deltadays > $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY']) // If timelimit exeeds 2359 2359 { 2360 2360 return false; … … 2386 2386 pwg_query($query); 2387 2387 2388 if ($conf_UAM[ 2] <> -1) // Delete user from unvalidated users group2388 if ($conf_UAM['NO_CONFIRM_GROUP'] <> -1) // Delete user from unvalidated users group 2389 2389 { 2390 2390 $query = ' 2391 2391 DELETE FROM '.USER_GROUP_TABLE.' 2392 2392 WHERE user_id = '.$data['user_id'].' 2393 AND group_id = '.$conf_UAM[ 2].'2393 AND group_id = '.$conf_UAM['NO_CONFIRM_GROUP'].' 2394 2394 ;'; 2395 2395 pwg_query($query); 2396 2396 } 2397 2397 2398 if ($conf_UAM[ 3] <> -1)2398 if ($conf_UAM['VALIDATED_GROUP'] <> -1) 2399 2399 { 2400 2400 $query = ' 2401 2401 DELETE FROM '.USER_GROUP_TABLE.' 2402 2402 WHERE user_id = '.$data['user_id'].' 2403 AND group_id = '.$conf_UAM[ 3].'2403 AND group_id = '.$conf_UAM['VALIDATED_GROUP'].' 2404 2404 ;'; 2405 2405 pwg_query($query); … … 2409 2409 (user_id, group_id) 2410 2410 VALUES 2411 ('.$data['user_id'].', '.$conf_UAM[ 3].')2411 ('.$data['user_id'].', '.$conf_UAM['VALIDATED_GROUP'].') 2412 2412 ;'; 2413 2413 pwg_query($query); 2414 2414 } 2415 2415 2416 if ($conf_UAM[ 4] <> -1) // Change user's status2416 if ($conf_UAM['VALIDATED_STATUS'] <> -1) // Change user's status 2417 2417 { 2418 2418 $query = ' 2419 2419 UPDATE '.USER_INFOS_TABLE.' 2420 SET status = "'.$conf_UAM[ 4].'"2420 SET status = "'.$conf_UAM['VALIDATED_STATUS'].'" 2421 2421 WHERE user_id = '.$data['user_id'].' 2422 2422 ;'; … … 2424 2424 } 2425 2425 2426 if ($conf_UAM[ 36] <> -1) // Change user's privacy level2426 if ($conf_UAM['VALID_LEVEL'] <> -1) // Change user's privacy level 2427 2427 { 2428 2428 $query = ' 2429 2429 UPDATE '.USER_INFOS_TABLE.' 2430 SET level = "'.$conf_UAM[ 36].'"2430 SET level = "'.$conf_UAM['VALID_LEVEL'].'" 2431 2431 WHERE user_id = '.$data['user_id'].' 2432 2432 ;'; … … 2472 2472 $conf_UAM = unserialize($conf['UserAdvManager']); 2473 2473 2474 if (isset($conf_UAM[ 1]) and $conf_UAM[1] == 'true') // Set date of validation2474 if (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true') // Set date of validation 2475 2475 { 2476 2476 $dbnow = date("Y-m-d H:i:s"); … … 2484 2484 } 2485 2485 2486 if ($conf_UAM[ 2] <> -1) // Delete user from waiting group2486 if ($conf_UAM['NO_CONFIRM_GROUP'] <> -1) // Delete user from waiting group 2487 2487 { 2488 2488 $query = ' 2489 2489 DELETE FROM '.USER_GROUP_TABLE.' 2490 2490 WHERE user_id = '.$id.' 2491 AND group_id = '.$conf_UAM[ 2].'2491 AND group_id = '.$conf_UAM['NO_CONFIRM_GROUP'].' 2492 2492 ;'; 2493 2493 pwg_query($query); 2494 2494 } 2495 2495 2496 if ($conf_UAM[ 3] <> -1) // Set user's valid group2496 if ($conf_UAM['VALIDATED_GROUP'] <> -1) // Set user's valid group 2497 2497 { 2498 2498 $query = ' 2499 2499 DELETE FROM '.USER_GROUP_TABLE.' 2500 2500 WHERE user_id = '.$id.' 2501 AND group_id = '.$conf_UAM[ 3].'2501 AND group_id = '.$conf_UAM['VALIDATED_GROUP'].' 2502 2502 ;'; 2503 2503 pwg_query($query); … … 2507 2507 (user_id, group_id) 2508 2508 VALUES 2509 ('.$id.', '.$conf_UAM[ 3].')2509 ('.$id.', '.$conf_UAM['VALIDATED_GROUP'].') 2510 2510 ;'; 2511 2511 pwg_query($query); 2512 2512 } 2513 2513 2514 if ($conf_UAM[ 4] <> -1) // Set user's valid status2514 if ($conf_UAM['VALIDATED_STATUS'] <> -1) // Set user's valid status 2515 2515 { 2516 2516 $query = ' 2517 2517 UPDATE '.USER_INFOS_TABLE.' 2518 SET status = "'.$conf_UAM[ 4].'"2518 SET status = "'.$conf_UAM['VALIDATED_STATUS'].'" 2519 2519 WHERE user_id = '.$id.' 2520 2520 ;'; … … 2522 2522 } 2523 2523 2524 if ($conf_UAM[ 36] <> -1) // Set user's valid privacy level2524 if ($conf_UAM['VALID_LEVEL'] <> -1) // Set user's valid privacy level 2525 2525 { 2526 2526 $query = ' 2527 2527 UPDATE '.USER_INFOS_TABLE.' 2528 SET level = "'.$conf_UAM[ 36].'"2528 SET level = "'.$conf_UAM['VALID_LEVEL'].'" 2529 2529 WHERE user_id = '.$id.' 2530 2530 ;'; … … 2556 2556 $conf_UAM = unserialize($conf['UserAdvManager']); 2557 2557 2558 if (isset($login) and isset($conf_UAM[ 6]) and !empty($conf_UAM[6]))2559 { 2560 $conf_CharExclusion = preg_split("/,/",$conf_UAM[ 6]);2558 if (isset($login) and isset($conf_UAM['USERNAME_CHAR_LIST']) and !empty($conf_UAM['USERNAME_CHAR_LIST'])) 2559 { 2560 $conf_CharExclusion = preg_split("/,/",$conf_UAM['USERNAME_CHAR_LIST']); 2561 2561 for ($i = 0 ; $i < count($conf_CharExclusion) ; $i++) 2562 2562 { … … 2615 2615 $conf_UAM = unserialize($conf['UserAdvManager']); 2616 2616 2617 if (isset($email) and isset($conf_UAM[ 11]) and !empty($conf_UAM[11]))2617 if (isset($email) and isset($conf_UAM['MAILEXCLUSION_LIST']) and !empty($conf_UAM['MAILEXCLUSION_LIST'])) 2618 2618 { 2619 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[ 11]);2619 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM['MAILEXCLUSION_LIST']); 2620 2620 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) 2621 2621 { … … 2669 2669 ON u.'.$conf['user_fields']['id'].' = ug.user_id 2670 2670 WHERE u.'.$conf['user_fields']['id'].' >= 3 2671 AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail[ 1].'"2672 OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail[ 1].'")2671 AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'" 2672 OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'") 2673 2673 AND u.UAM_validated = "false" 2674 2674 ORDER BY ui.registration_date ASC … … 2744 2744 ON u.'.$conf['user_fields']['id'].' = ui.user_id 2745 2745 WHERE u.'.$conf['user_fields']['id'].' >= 3 2746 AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail[ 1].'")2746 AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'") 2747 2747 ORDER BY ui.registration_date ASC;'; 2748 2748 … … 2783 2783 INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv 2784 2784 ON u.'.$conf['user_fields']['id'].' = lv.user_id 2785 WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[ 16].'")2785 WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM['GHOSTRACKER_DAYLIMIT'].'") 2786 2786 ORDER BY lv.lastvisit ASC;'; 2787 2787 … … 2830 2830 INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv 2831 2831 ON u.'.$conf['user_fields']['id'].' = lv.user_id 2832 WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[ 16].'")2832 WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM['GHOSTRACKER_DAYLIMIT'].'") 2833 2833 ORDER BY lv.lastvisit ASC;'; 2834 2834 … … 2940 2940 // Condition with the value set for time limit 2941 2941 // ------------------------------------------- 2942 if ($deltadays <= $conf_UAM_ConfirmMail[ 1]) // If Nb of days is less than the limit set2942 if ($deltadays <= $conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY']) // If Nb of days is less than the limit set 2943 2943 { 2944 2944 return false; … … 3200 3200 $result = pwg_query($query); 3201 3201 3202 while ($row = mysql_fetch_array($result))3202 while ($row = pwg_db_fetch_assoc($result)) 3203 3203 { 3204 3204 if ($row['UAM_pwdreset'] == 'false') … … 3264 3264 $insertions .= "DROP TABLE IF EXISTS ".$ListTables[$j].";\n\n"; 3265 3265 3266 $array = mysql_fetch_array($res);3266 $array = pwg_db_fetch_row($res); 3267 3267 $array[1] .= ";\n\n"; 3268 3268 $insertions .= $array[1]; 3269 3269 3270 $req_table = pwg_query('SELECT * FROM '.$ListTables[$j]) or die(mysql_error()); 3271 $nb_fields = mysql_num_fields($req_table); 3272 while ($line = mysql_fetch_array($req_table)) 3270 $req_table = pwg_query('DESCRIBE '.$ListTables[$j].';') or die(my_error()); 3271 $nb_fields = pwg_db_num_rows($req_table); 3272 $req_table2 = pwg_query('SELECT * FROM '.$ListTables[$j]) or die(my_error()); 3273 3274 while ($line = pwg_db_fetch_row($req_table2)) 3273 3275 { 3274 3276 $insertions .= 'INSERT INTO '.$ListTables[$j].' VALUES ('; … … 3296 3298 3297 3299 $pattern = "UserAdvManager%"; 3298 $req_table = pwg_query('SELECT * FROM '.CONFIG_TABLE.' WHERE param LIKE "'.$pattern.'";') or die(mysql_error()); 3299 $nb_fields = mysql_num_fields($req_table); 3300 3301 while ($line = mysql_fetch_array($req_table)) 3300 $req_table = pwg_query('SELECT * FROM '.CONFIG_TABLE.' WHERE param LIKE "'.$pattern.'";') or die(my_error()); 3301 $nb_fields = pwg_db_num_rows($req_table); 3302 $nb_fields = $nb_fields - 1; // Fix the number of fields because pwg_db_num_rows() returns a bad number 3303 3304 while ($line = pwg_db_fetch_row($req_table)) 3302 3305 { 3303 3306 $insertions = 'INSERT INTO '.CONFIG_TABLE.' VALUES ('; -
extensions/UserAdvManager/trunk/include/upgradedb.inc.php
r20591 r21075 685 685 $result = pwg_query($query); 686 686 687 while($row = mysql_fetch_array($result))687 while($row = pwg_db_fetch_assoc($result)) 688 688 { 689 689 $query = ' … … 703 703 pwg_query($query); 704 704 } 705 706 707 /* upgrade from 2.41.x to 2.50.0 */ 708 /* ***************************** */ 709 function upgrade_2410_2500() 710 { 711 global $conf; 712 713 load_language('plugin.lang', UAM_PATH); 714 715 // Upgrading options - Changing config variables to assoc array 716 // ------------------------------------------------------------ 717 718 // Upgrade $conf_UAM options 719 $conf_UAM = unserialize($conf['UserAdvManager']); 720 721 $Newconf_UAM = array( 722 'MAIL_INFO' => $conf_UAM[0], 723 'CONFIRM_MAIL' => $conf_UAM[1], 724 'NO_CONFIRM_GROUP' => $conf_UAM[2], 725 'VALIDATED_GROUP' => $conf_UAM[3], 726 'VALIDATED_STATUS' => $conf_UAM[4], 727 'USERNAME_CHAR' => $conf_UAM[5], 728 'USERNAME_CHAR_LIST' => $conf_UAM[6], 729 'NO_CONFIRM_STATUS' => $conf_UAM[7], 730 'MAILINFO_TEXT' => $conf_UAM[8], 731 'CONFIRMMAIL_TEXT' => $conf_UAM[9], 732 'MAILEXCLUSION' => $conf_UAM[10], 733 'MAILEXCLUSION_LIST' => $conf_UAM[11], 734 'PASSWORDENF' => $conf_UAM[12], 735 'PASSWORD_SCORE' => $conf_UAM[13], 736 'ADMINPASSWENF' => $conf_UAM[14], 737 'GHOSTRACKER' => $conf_UAM[15], 738 'GHOSTRACKER_DAYLIMIT' => $conf_UAM[16], 739 'GHOSTRACKER_REMINDERTEXT' => $conf_UAM[17], 740 'ADDLASTVISIT' => $conf_UAM[18], 741 'ADMINCONFMAIL' => $conf_UAM[19], 742 'REDIRTOPROFILE' => $conf_UAM[20], 743 'GTAUTO' => $conf_UAM[21], 744 'GTAUTOMAIL' => $conf_UAM[22], 745 'GTAUTODEL' => $conf_UAM[23], 746 'GTAUTOMAILTEXT' => $conf_UAM[24], 747 'DOWNGRADE_GROUP' => $conf_UAM[25], 748 'DOWNGRADE_STATUS' => $conf_UAM[26], 749 'ADMINVALIDATIONMAIL' => $conf_UAM[27], 750 'CUSTOMPASSWRETR' => $conf_UAM[28], 751 'CUSTOMPASSWRETR_TEXT' => $conf_UAM[29], 752 'USRAUTO' => $conf_UAM[30], 753 'USRAUTODEL' => $conf_UAM[31], 754 'USRAUTOMAIL' => $conf_UAM[32], 755 'STUFFS' => $conf_UAM[33], 756 'HIDEPASSW' => $conf_UAM[34], 757 'NO_VALID_LEVEL' => $conf_UAM[35], 758 'VALID_LEVEL' => $conf_UAM[36], 759 'DOWNGRADE_LEVEL' => $conf_UAM[37], 760 'PWDRESET' => $conf_UAM[38], 761 'REJECTCONNECT' => $conf_UAM[39], 762 'REJECTCONNECT_TEXT' => $conf_UAM[40], 763 'CONFIRMMAIL_SUBJECT' => $conf_UAM[41], 764 'CONFIRMMAIL_REMAIL_SUBJECT' => $conf_UAM[42], 765 'INFOMAIL_SUBJECT' => $conf_UAM[43], 766 'GTAUTOMAIL_SUBJECT' => $conf_UAM[44], 767 'GTREMINDER_SUBJECT' => $conf_UAM[45], 768 'ADMINVALIDATIONMAIL_SUBJECT' => $conf_UAM[46] 769 ); 770 771 // unset obsolete conf 772 // ------------------- 773 for ($i = 0; $i <= 46; $i++) 774 { 775 unset ($conf_UAM[$i]); 776 } 777 778 $update_conf = serialize($Newconf_UAM); 779 780 conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf)); 781 782 783 // Upgrade $conf_UAM_ConfirmMail 784 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 785 786 $Newconf_UAM_ConfirmMail = array ( 787 'CONFIRMMAIL_TIMEOUT' => $conf_UAM_ConfirmMail[0], 788 'CONFIRMMAIL_DELAY' => $conf_UAM_ConfirmMail[1], 789 'CONFIRMMAIL_REMAIL_TXT1' => $conf_UAM_ConfirmMail[2], 790 'CONFIRMMAIL_REMAIL' => $conf_UAM_ConfirmMail[3], 791 'CONFIRMMAIL_REMAIL_TXT2' => $conf_UAM_ConfirmMail[4], 792 'CONFIRMMAIL_CUSTOM_TXT1' => $conf_UAM_ConfirmMail[5], 793 'CONFIRMMAIL_CUSTOM_TXT2' => $conf_UAM_ConfirmMail[6] 794 ); 795 796 // unset obsolete conf 797 // ------------------- 798 for ($i = 0; $i <= 6; $i++) 799 { 800 unset ($conf_UAM_ConfirmMail[$i]); 801 } 802 803 $update_conf = serialize($Newconf_UAM_ConfirmMail); 804 805 conf_update_param('UserAdvManager_ConfirmMail', pwg_db_real_escape_string($update_conf)); 806 } 705 807 ?> -
extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r19234 r21075 16 16 $lang['UAM_Err_audit_username_char'] = '<b>Ce compte contient un ou des caractères interdits :</b> '; 17 17 $lang['UAM_Err_audit_email_forbidden'] = '<b>Ce compte contient des domaines de messagerie interdit :</b> '; 18 $lang['UAM_Err_audit_advise'] = '<b>Vous avez des corrections afaire pour respecter les nouvelles règles que vous avez activées.<br>Utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b><br><br>';19 $lang['UAM_reg_err_login2'] = 'le nom utilisateur ne doit pas contenir les caractère suivants : ';18 $lang['UAM_Err_audit_advise'] = '<b>Vous avez des corrections à faire pour respecter les nouvelles règles que vous avez activées.<br>Utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b><br><br>'; 19 $lang['UAM_reg_err_login2'] = 'le nom utilisateur ne doit pas contenir les caractères suivants : '; 20 20 $lang['UAM_reg_err_login5'] = 'L\'adresse email est issue d\'un prestataire interdit. Les prestataires d\'adresses email interdits à l\'inscription sont : '; 21 21 $lang['UAM_empty_pwd'] = '[mot de passe vide]'; -
extensions/UserAdvManager/trunk/main.inc.php
r18205 r21075 69 69 // PWG_Stuffs module 70 70 // ----------------- 71 if (isset($conf_UAM[ 33]) and $conf_UAM[33] == 'true')71 if (isset($conf_UAM['STUFFS']) and $conf_UAM['STUFFS'] == 'true') 72 72 { 73 73 add_event_handler('get_stuffs_modules', 'register_UAM_stuffs_module'); … … 76 76 // Add new feature in user_list - Password Reset 77 77 // --------------------------------------------- 78 if (isset($conf_UAM[ 38]) and $conf_UAM[38] == 'true')78 if (isset($conf_UAM['PWDRESET']) and $conf_UAM['PWDRESET'] == 'true') 79 79 { 80 80 // Add new column on user_list -
extensions/UserAdvManager/trunk/maintain.inc.php
r18479 r21075 20 20 /* ****************************************************************** */ 21 21 22 $defaultUAM = array();23 $defaultConfirmMail = array();24 25 22 // Default global parameters for UserAdvManager conf 26 23 // ------------------------------------------------- 27 $defaultUAM[0] = 'false'; // UAM_MAIL_INFO_TRUE/FALSE 28 $defaultUAM[1] = 'false'; // UAM_CONFIRM_MAIL_TRUE/FALSE 29 $defaultUAM[2] = '-1'; // UAM_No_Confirm_Group 30 $defaultUAM[3] = '-1'; // UAM_Validated_Group 31 $defaultUAM[4] = '-1'; // UAM_Validated_Status 32 $defaultUAM[5] = 'false'; // UAM_USERNAME_CHAR_TRUE 33 $defaultUAM[6] = ''; // UAM_USERNAME_CHAR_LIST 34 $defaultUAM[7] = '-1'; // UAM_No_Confirm_Status 35 $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt'); // UAM_MAILINFO_TEXT 36 $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt'); // UAM_CONFIRMMAIL_TEXT 37 $defaultUAM[10] = 'false'; // UAM_MAILEXCLUSION_TRUE/FALSE 38 $defaultUAM[11] = ''; // UAM_MAILEXCLUSION_LIST 39 $defaultUAM[12] = 'false'; // UAM_PASSWORDENF_TRUE/FALSE 40 $defaultUAM[13] = '100'; // UAM_PASSWORD_SCORE 41 $defaultUAM[14] = 'false'; // UAM_ADMINPASSWENF_TRUE/FALSE 42 $defaultUAM[15] = 'false'; // UAM_GHOSTRACKER_TRUE/FALSE 43 $defaultUAM[16] = '10'; // UAM_GHOSTRACKER_DAYLIMIT 44 $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt'); // UAM_GHOSTRACKER_REMINDERTEXT 45 $defaultUAM[18] = 'false'; // UAM_ADDLASTVISIT_TRUE/FALSE 46 $defaultUAM[19] = 'false'; // UAM_ADMINCONFMAIL_TRUE/FALSE 47 $defaultUAM[20] = 'false'; // UAM_REDIRTOPROFILE_TRUE/FALSE 48 $defaultUAM[21] = 'false'; // UAM_GTAUTO_TRUE/FALSE 49 $defaultUAM[22] = 'false'; // UAM_GTAUTOMAIL_TRUE/FALSE 50 $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt'); // UAM_GTAUTODEL_TEXT 51 $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt'); // UAM_GTAUTOMAILTEXT 52 $defaultUAM[25] = '-1'; // UAM_Downgrade_Group 53 $defaultUAM[26] = '-1'; // UAM_Downgrade_Status 54 $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt'); // UAM_ADMINVALIDATIONMAIL_TEXT 55 $defaultUAM[28] = 'false'; // UAM_CUSTOMPASSWRETR_TRUE/FALSE 56 $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt'); // UAM_CUSTOMPASSWRETR_TEXT 57 $defaultUAM[30] = 'false'; // UAM_USRAUTO_TRUE/FALSE 58 $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt'); // UAM_USRAUTODEL_TEXT 59 $defaultUAM[32] = 'false'; // UAM_USRAUTOMAIL_TRUE/FALSE 60 $defaultUAM[33] = 'false'; // UAM_STUFFS_TRUE/FALSE 61 $defaultUAM[34] = 'false'; // UAM_HIDEPASSW_TRUE/FALSE 62 $defaultUAM[35] = '-1'; // UAM_NO_VALID_LEVEL 63 $defaultUAM[36] = '-1'; // UAM_VALID_LEVEL 64 $defaultUAM[37] = '-1'; // UAM_DOWNGRADE_LEVEL 65 $defaultUAM[38] = 'false'; // UAM_PWDRESET_TRUE/FALSE 66 $defaultUAM[39] = 'false'; // UAM_REJECTCONNECT_TRUE/FALSE 67 $defaultUAM[40] = l10n('UAM_Default_RejectConnexion_Txt'); // UAM_REJECTCONNECT_TEXT 68 $defaultUAM[41] = l10n('UAM_Default_ConfirmMail_Subject'); // UAM_CONFIRMMAIL_SUBJECT 69 $defaultUAM[42] = l10n('UAM_Default_ConfirmMail_Remail_Subject'); // UAM_CONFIRMMAIL_REMAIL_SUBJECT 70 $defaultUAM[43] = l10n('UAM_Default_InfoMail_Subject'); // UAM_INFOMAIL_SUBJECT 71 $defaultUAM[44] = l10n('UAM_Default_GTAutoMail_Subject'); // UAM_GTAUTOMAIL_SUBJECT 72 $defaultUAM[45] = l10n('UAM_Default_GTReminder_Subject'); // UAM_GTREMINDER_SUBJECT 73 $defaultUAM[46] = l10n('UAM_Default_AdminValidationMail_Subject');// UAM_ADMINVALIDATIONMAIL_SUBJECT 24 $defaultUAM = array( 25 'MAIL_INFO' => 'false', 26 'CONFIRM_MAIL' => 'false', 27 'NO_CONFIRM_GROUP' => '-1', 28 'VALIDATED_GROUP' => '-1', 29 'VALIDATED_STATUS' => '-1', 30 'USERNAME_CHAR' => 'false', 31 'USERNAME_CHAR_LIST' => '', 32 'NO_CONFIRM_STATUS' => '-1', 33 'MAILINFO_TEXT' => l10n('UAM_Default_InfoMail_Txt'), 34 'CONFIRMMAIL_TEXT' => l10n('UAM_Default_ConfirmMail_Txt'), 35 'MAILEXCLUSION' => 'false', 36 'MAILEXCLUSION_LIST' => '', 37 'PASSWORDENF' => 'false', 38 'PASSWORD_SCORE' => '100', 39 'ADMINPASSWENF' => 'false', 40 'GHOSTRACKER' => 'false', 41 'GHOSTRACKER_DAYLIMIT' => '10', 42 'GHOSTRACKER_REMINDERTEXT' => l10n('UAM_Default_GhstReminder_Txt'), 43 'ADDLASTVISIT' => 'false', 44 'ADMINCONFMAIL' => 'false', 45 'REDIRTOPROFILE' => 'false', 46 'GTAUTO' => 'false', 47 'GTAUTOMAIL' => 'false', 48 'GTAUTODEL' => l10n('UAM_Default_GhstDeletion_Txt'), 49 'GTAUTOMAILTEXT' => l10n('UAM_Default_GhstDemotion_Txt'), 50 'DOWNGRADE_GROUP' => '-1', 51 'DOWNGRADE_STATUS' => '-1', 52 'ADMINVALIDATIONMAIL' => l10n('UAM_Default_AdminValidation_Txt'), 53 'CUSTOMPASSWRETR' => 'false', 54 'CUSTOMPASSWRETR_TEXT' => l10n('UAM_Default_PwdRequest_Txt'), 55 'USRAUTO' => 'false', 56 'USRAUTODEL' => l10n('UAM_Default_ValidationTimeout_Txt'), 57 'USRAUTOMAIL' => 'false', 58 'STUFFS' => 'false', 59 'HIDEPASSW' => 'false', 60 'NO_VALID_LEVEL' => '-1', 61 'VALID_LEVEL' => '-1', 62 'DOWNGRADE_LEVEL' => '-1', 63 'PWDRESET' => 'false', 64 'REJECTCONNECT' => 'false', 65 'REJECTCONNECT_TEXT' => l10n('UAM_Default_RejectConnexion_Txt'), 66 'CONFIRMMAIL_SUBJECT' => l10n('UAM_Default_ConfirmMail_Subject'), 67 'CONFIRMMAIL_REMAIL_SUBJECT' => l10n('UAM_Default_ConfirmMail_Remail_Subject'), 68 'INFOMAIL_SUBJECT' => l10n('UAM_Default_InfoMail_Subject'), 69 'GTAUTOMAIL_SUBJECT' => l10n('UAM_Default_GTAutoMail_Subject'), 70 'GTREMINDER_SUBJECT' => l10n('UAM_Default_GTReminder_Subject'), 71 'ADMINVALIDATIONMAIL_SUBJECT' => l10n('UAM_Default_AdminValidationMail_Subject') 72 ); 74 73 75 74 // Default specific parameters for UserAdvManager ConfirmMail conf 76 75 // --------------------------------------------------------------- 77 $defaultConfirmMail[0] = 'false'; // UAM_CONFIRMMAIL_TIMEOUT_TRUE/FALSE 78 $defaultConfirmMail[1] = '5'; // UAM_CONFIRMMAIL_DELAY 79 $defaultConfirmMail[2] = l10n('UAM_Default_CfmMail_Remail_Txt1'); // UAM_CONFIRMMAIL_REMAIL_TXT1 80 $defaultConfirmMail[3] = 'false'; // UAM_CONFIRMMAIL_REMAIL_TRUE/FALSE 81 $defaultConfirmMail[4] = l10n('UAM_Default_CfmMail_Remail_Txt2'); // UAM_CONFIRMMAIL_REMAIL_TXT2 82 $defaultConfirmMail[5] = l10n('UAM_Default_CfmMail_Custom_Txt1'); // UAM_CONFIRMMAIL_CUSTOM_TXT1 83 $defaultConfirmMail[6] = l10n('UAM_Default_CfmMail_Custom_Txt2'); // UAM_CONFIRMMAIL_CUSTOM_TXT2 76 $defaultConfirmMail = array( 77 'CONFIRMMAIL_TIMEOUT' => 'false', 78 'CONFIRMMAIL_DELAY' => '5', 79 'CONFIRMMAIL_REMAIL_TXT1' => l10n('UAM_Default_CfmMail_Remail_Txt1'), 80 'CONFIRMMAIL_REMAIL' => 'false', 81 'CONFIRMMAIL_REMAIL_TXT2' => l10n('UAM_Default_CfmMail_Remail_Txt2'), 82 'CONFIRMMAIL_CUSTOM_TXT1' => l10n('UAM_Default_CfmMail_Custom_Txt1'), 83 'CONFIRMMAIL_CUSTOM_TXT2' => l10n('UAM_Default_CfmMail_Custom_Txt2') 84 ); 84 85 85 86 // Set current plugin version in config table … … 290 291 /* Check for upgrade from 2.12 to 2.13 */ 291 292 /* *********************************** */ 292 $fields = mysql_list_fields($conf['db_base'],USER_CONFIRM_MAIL_TABLE);293 $nb_fields = mysql_num_fields($fields);293 $fields = pwg_query('SHOW COLUMNS FROM '.USER_CONFIRM_MAIL_TABLE.';'); 294 $nb_fields = pwg_db_num_rows($fields); 294 295 295 296 if ($nb_fields < 6) … … 404 405 upgrade_2400_2410(); 405 406 } 407 408 if (version_compare($conf['UserAdvManager_Version'], '2.50.0') < 0) 409 { 410 /* upgrade from version 2.41.x to 2.50.0 */ 411 /* ************************************* */ 412 upgrade_2410_2500(); 413 } 406 414 } 407 415
Note: See TracChangeset
for help on using the changeset viewer.