Ignore:
Timestamp:
Apr 15, 2011, 9:41:42 PM (13 years ago)
Author:
Eric
Message:

bug 2265 fixed : Add of a new option to display or not user's password in information email
Improving UAM version check for db upgrade
Version 2.20.4 hard coded

Location:
extensions/UserAdvManager/trunk/include
Files:
2 edited

Legend:

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

    r10342 r10391  
    858858  if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true')
    859859  {
    860     $infos1 = array(
    861       get_l10n_args('UAM_infos_mail %s', stripslashes($username)),
    862       get_l10n_args('UAM_User: %s', stripslashes($username)),
    863       get_l10n_args('UAM_Password: %s', $password),
    864       get_l10n_args('Email: %s', $email),
    865       get_l10n_args('', ''),
    866     );
    867   }
    868 
     860    if (isset($conf_UAM[35]) and $conf_UAM[35] == 'false') // Allow display of clear password in email
     861    {
     862      $infos1 = array(
     863        get_l10n_args('UAM_infos_mail %s', stripslashes($username)),
     864        get_l10n_args('UAM_User: %s', stripslashes($username)),
     865        get_l10n_args('UAM_Password: %s', $password),
     866        get_l10n_args('Email: %s', $email),
     867        get_l10n_args('', ''),
     868      );
     869    }
     870    else // Do not allow display of clear password in email
     871    {
     872      $infos1 = array(
     873        get_l10n_args('UAM_infos_mail %s', stripslashes($username)),
     874        get_l10n_args('UAM_User: %s', stripslashes($username)),
     875        get_l10n_args('Email: %s', $email),
     876        get_l10n_args('', ''),
     877      );
     878    }
     879  }
    869880
    870881  if ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and $confirm)
  • extensions/UserAdvManager/trunk/include/upgradedb.inc.php

    r10144 r10391  
    398398  }
    399399}
     400
     401/* upgrade from 2.20.3 to 2.20.4 */
     402/* ***************************** */
     403function upgrade_2203_2204()
     404{
     405  global $conf;
     406
     407  // Upgrading options
     408  $query = '
     409SELECT value
     410  FROM '.CONFIG_TABLE.'
     411WHERE param = "UserAdvManager"
     412;';
     413
     414  $result = pwg_query($query);
     415  $conf_UAM = pwg_db_fetch_assoc($result);
     416   
     417  $Newconf_UAM = unserialize($conf_UAM['value']);
     418 
     419  $Newconf_UAM[35] = 'false';
     420 
     421  $update_conf = serialize($Newconf_UAM);
     422   
     423  $query = '
     424UPDATE '.CONFIG_TABLE.'
     425SET value="'.addslashes($update_conf).'"
     426WHERE param="UserAdvManager"
     427LIMIT 1
     428;';
     429
     430        pwg_query($query);
     431}
    400432?>
Note: See TracChangeset for help on using the changeset viewer.