Ignore:
Timestamp:
Mar 17, 2013, 2:08:54 PM (11 years ago)
Author:
Eric
Message:

merge r21598, r21606, r21611 and r21612 from trunk to branch 2.50

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.50/include/functions.inc.php

    r21520 r21633  
    23032303
    23042304                                                // Set UAM_validated field to True in #_users table
    2305                                                 $query = '
    2306 UPDATE '.USERS_TABLE.'
    2307 SET UAM_validated = "true"
    2308 WHERE id = '.$data['user_id'].'
    2309 ;';
    2310                                                 pwg_query($query);
     2305            SetValidated($data['user_id']);
    23112306
    23122307                                                // Refresh user's category cache
     
    23952390
    23962391          // Set UAM_validated field to True in #_users table
    2397           $query = '
    2398 UPDATE '.USERS_TABLE.'
    2399 SET UAM_validated = "true"
    2400 WHERE id = '.$data['user_id'].'
    2401 ;';
    2402           pwg_query($query);
     2392          SetValidated($data['user_id']);
    24032393
    24042394          // Refresh user's category cache
     
    24932483
    24942484                // Set UAM_validated field to True in #_users table
    2495                 $query = '
    2496 UPDATE '.USERS_TABLE.'
    2497 SET UAM_validated = "true"
    2498 WHERE id = '.$id.'
    2499 ;';
    2500                 pwg_query($query);
     2485                SetValidated($data['user_id']);
    25012486}
    25022487
     
    26292614    ON u.'.$conf['user_fields']['id'].' = ug.user_id
    26302615WHERE u.'.$conf['user_fields']['id'].' >= 3
     2616  AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    26312617  AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'"
    26322618  OR TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) < "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'")
     
    27042690    ON u.'.$conf['user_fields']['id'].' = ui.user_id
    27052691WHERE u.'.$conf['user_fields']['id'].' >= 3
     2692  AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    27062693  AND (TO_DAYS(NOW()) - TO_DAYS(ui.registration_date) >= "'.$conf_UAM_ConfirmMail['CONFIRMMAIL_DELAY'].'")
    27072694ORDER BY ui.registration_date ASC;';
     
    27442731    ON u.'.$conf['user_fields']['id'].' = lv.user_id
    27452732WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM['GHOSTRACKER_DAYLIMIT'].'")
     2733AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    27462734ORDER BY lv.lastvisit ASC;';
    27472735
     
    27912779    ON u.'.$conf['user_fields']['id'].' = lv.user_id
    27922780WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM['GHOSTRACKER_DAYLIMIT'].'")
     2781AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    27932782ORDER BY lv.lastvisit ASC;';
    27942783
     
    28272816    ON u.'.$conf['user_fields']['id'].' = ug.user_id
    28282817WHERE u.'.$conf['user_fields']['id'].' >= 3
     2818  AND u.'.$conf['user_fields']['id'].' <> '.$conf['default_user_id'].'
    28292819  AND u.username NOT LIKE "16"
    28302820  AND u.username NOT LIKE "18"
     
    30863076  $result = pwg_db_fetch_assoc(pwg_query($query));
    30873077
    3088   if($result['UAM_validated'] == 'true')
     3078  if($result['UAM_validated'] == 'true' or is_null($result['UAM_validated']))
    30893079  {
    30903080    return true;
     
    31043094UPDATE '.USERS_TABLE.'
    31053095SET UAM_validated = "false"
     3096WHERE id = '.$user_id.'
     3097LIMIT 1
     3098;';
     3099
     3100  pwg_query($query);
     3101}
     3102
     3103
     3104/**
     3105 * SetValidated
     3106 * Set UAM_validated field to true in #_users table
     3107 *
     3108 **/
     3109function SetValidated($user_id)
     3110{
     3111  $query ='
     3112UPDATE '.USERS_TABLE.'
     3113SET UAM_validated = "true"
    31063114WHERE id = '.$user_id.'
    31073115LIMIT 1
Note: See TracChangeset for help on using the changeset viewer.