Ignore:
Timestamp:
Mar 16, 2013, 5:43:15 PM (11 years ago)
Author:
Eric
Message:

Bug 2871 fixed - Improved process : User registration is confirmed by default when user is added by an admin and "confirmation of registration for admins" is set to OFF

File:
1 edited

Legend:

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

    r21598 r21606  
    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
     
    30913076  $result = pwg_db_fetch_assoc(pwg_query($query));
    30923077
    3093   if($result['UAM_validated'] == 'true')
     3078  if($result['UAM_validated'] == 'true' or is_null($result['UAM_validated']))
    30943079  {
    30953080    return true;
     
    31093094UPDATE '.USERS_TABLE.'
    31103095SET 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"
    31113114WHERE id = '.$user_id.'
    31123115LIMIT 1
Note: See TracChangeset for help on using the changeset viewer.