Changeset 17891 for extensions/UserAdvManager/trunk
- Timestamp:
- Sep 13, 2012, 6:49:31 PM (12 years ago)
- Location:
- extensions/UserAdvManager/trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/include/functions.inc.php
r17890 r17891 105 105 106 106 // Perform user logout after registration if not validated 107 if ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) )107 if ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and is_webmaster()) 108 108 { 109 109 invalidate_user_cache(); -
extensions/UserAdvManager/trunk/include/upgradedb.inc.php
r17890 r17891 652 652 // Fill UAM_validated column with correct information for registered and validated users 653 653 // -------------------------------------------------------------------------------------- 654 $query = ' 655 SELECT DISTINCT u.id AS id 654 655 // It goes for everybody registered in the gallery except for Guest and AC users (16 and 18) 656 $query = ' 657 SELECT DISTINCT u.id AS id, u.username AS username 656 658 FROM '.USERS_TABLE.' AS u 657 INNER JOIN '.USER_INFOS_TABLE.' AS ui 658 ON u.id = ui.user_id 659 LEFT JOIN '.USER_GROUP_TABLE.' AS ug 660 ON u.id = ug.user_id 661 WHERE u.id <> 2'; 662 663 if ($conf_UAM[3] <> '-1' and $conf_UAM[4] == '-1') 664 { 665 $query.= ' 666 AND ug.group_id = '.$conf_UAM[3]; 667 } 668 if ($conf_UAM[3] == '-1' and $conf_UAM[4] <> '-1') 669 { 670 $query.= ' 671 AND ui.status = \''.$conf_UAM[4]."'"; 672 } 673 if ($conf_UAM[3] <> '-1' and $conf_UAM[4] <> '-1') 674 { 675 $query.= ' 676 AND ug.group_id = '.$conf_UAM[3]; 677 } 678 $query.= ';'; 679 680 $result = pwg_query($query); 681 682 while($row = mysql_fetch_array($result)) 683 { 684 $query = ' 659 INNER JOIN '.USER_INFOS_TABLE.' AS ui 660 ON u.id = ui.user_id 661 LEFT JOIN '.USER_GROUP_TABLE.' AS ug 662 ON u.id = ug.user_id 663 WHERE u.id != 2 664 AND u.username != \'16\' 665 AND u.username != \'18\''; 666 667 if ($conf_UAM[3] <> '-1' and $conf_UAM[4] == '-1') 668 { 669 $query.= ' 670 AND ug.group_id = '.$conf_UAM[3]; 671 } 672 if ($conf_UAM[3] == '-1' and $conf_UAM[4] <> '-1') 673 { 674 $query.= ' 675 AND ui.status = \''.$conf_UAM[4]."'"; 676 } 677 if ($conf_UAM[3] <> '-1' and $conf_UAM[4] <> '-1') 678 { 679 $query.= ' 680 AND ug.group_id = '.$conf_UAM[3]; 681 } 682 $query.= ';'; 683 684 $result = pwg_query($query); 685 686 while($row = mysql_fetch_array($result)) 687 { 688 $query = ' 685 689 UPDATE '.USERS_TABLE.' 686 690 SET UAM_validated=true 687 WHERE id = "'.$row['id'].'" 688 ;'; 689 pwg_query($query); 690 } 691 WHERE id = '.$row['id'].' 692 ;'; 693 pwg_query($query); 694 } 695 696 // It goes to Webmaster too 697 $query = ' 698 UPDATE '.USERS_TABLE.' 699 SET UAM_validated=true 700 WHERE id = 1 701 ;'; 702 pwg_query($query); 691 703 } 692 704 ?>
Note: See TracChangeset
for help on using the changeset viewer.