Changeset 12227


Ignore:
Timestamp:
09/25/11 21:55:57 (8 years ago)
Author:
Eric
Message:

bug 2445 fixed : Duplicate key MySql error when a registered user tries to validate his registration twice

Location:
extensions/UserAdvManager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/ConfirmMail.php

    r9253 r12227  
    4444/* We have to get the user's language in database */ 
    4545    $query = ' 
    46 SELECT '.USER_INFOS_TABLE.'.language 
    47 FROM '.USER_INFOS_TABLE.','.USER_CONFIRM_MAIL_TABLE.' 
    48 WHERE (('.USER_INFOS_TABLE.'.user_id ='.$userid.') AND ('.USER_INFOS_TABLE.'.user_id = '.USER_CONFIRM_MAIL_TABLE.'.user_id)) 
     46SELECT language 
     47FROM '.USER_INFOS_TABLE.' 
     48WHERE '.USER_INFOS_TABLE.'.user_id ='.$userid.' 
    4949;'; 
    5050    $data = pwg_db_fetch_assoc(pwg_query($query)); 
  • extensions/UserAdvManager/trunk/changelog.txt.php

    r12205 r12227  
    264264            Piwigo 2.3.0 compliant 
    265265            Bug 2415 fixed - New feature : Set automatically privacy level for users who have validated or not their registration. Automated task available. 
     266            Bug 2445 fixed - Duplicate key MySql error when a user tries to validate his registration twice. 
    266267            Help files remaned and relocated in the language root directory (no more "help" subdirectory) for compliance with the new online translation tool. 
    267268*/ 
  • extensions/UserAdvManager/trunk/include/functions.inc.php

    r12189 r12227  
    16011601    $data = pwg_db_fetch_assoc(pwg_query($query)); 
    16021602 
    1603     if (!empty($data) and isset($data['user_id'])) 
     1603    if (!empty($data) and isset($data['user_id']) and is_null($data['date_check'])) 
    16041604    { 
    16051605      $query = " 
     
    17791779                        } 
    17801780                } 
     1781    else if (!empty($data) and !is_null($data['date_check'])) 
     1782    { 
     1783      return false; 
     1784    } 
    17811785        } 
    17821786  else 
Note: See TracChangeset for help on using the changeset viewer.