Changeset 4185


Ignore:
Timestamp:
Nov 4, 2009, 9:53:26 PM (14 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Adding a password field control for SendMail2User - Neighborhood plugin compatibility improvement
  • Bug 1229 fixed - Email was no longer mandatory when plugin was active, even if Piwigo's email madatory option was set.
Location:
extensions/NBC_UserAdvManager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php

    r4159 r4185  
    2121      $password = $password <> '' ? $password : l10n('UserAdvManager_empty_pwd');
    2222     
    23       if ( function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '' )
     23      if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[10]) and $conf_nbc_UserAdvManager[10] <> '')
    2424        $infos1_perso = get_user_language_desc($conf_nbc_UserAdvManager[10])."\n\n";
    2525     
     
    3939  }
    4040
    41   if ( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true' )
     41  if (isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true')
    4242  {
    4343    $infos1 = array(
     
    5959    );
    6060
    61     if ( function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '' )
     61    if (function_exists('get_user_language_desc') and isset($conf_nbc_UserAdvManager[11]) and $conf_nbc_UserAdvManager[11] <> '')
    6262      $infos2_perso = get_user_language_desc($conf_nbc_UserAdvManager[11])."\n\n";
    6363  }
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r4164 r4185  
    22/*
    33Plugin Name: NBC UserAdvManager
    4 Version: 2.12.3
     4Version: 2.12.4
    55Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
     
    4848                                                        split replace by preg_split
    4949                               
    50 -- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin
     50-- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin
     51
     52
     53 ***** Plugin history (branch 2.11)*****
    5154
    5255-- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Renew validation key, list unvalidated users,...)
     
    7073-- 2.11.5 : Bug 1195 fixed : Registration displays the good title
    7174
     75
     76 ***** Plugin history (branch 2.12)*****
     77
    7278-- 2.12.0 : Bug 1206 fixed : All plugin functionnalities work in user's profile page
    7379                Plugin's core code and admin panel refactoring
     
    8288            Some code beautify (SQL requests and HTML 4 strict for tpl)
    8389
    84 -- 2.12.3 : Bug 1226 fixed - "duplicate key error" when lastvisit table is not empty and on using Ghost Tracker init function
     90-- 2.12.3 : Bug 1226 fixed - "duplicate key error" when lastvisit table is not empty and on using Ghost Tracker init function
     91
     92-- 2.12.4 : Adding a password field control for SendMail2User - Neighborhood plugin compatibility improvement
     93            Bug 1229 fixed - Email was no longer mandatory when plugin was active, even if Piwigo's email madatory option was set.
    8594*/
    8695
     
    200209  if ((isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true'))
    201210  {
    202     SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true);
     211    $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
     212    SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true);
    203213  }
    204214}
     
    268278  }
    269279
     280  /* Email mandatory - Needed to be add here to avoid jump of standard Piwigo email control */
     281  if (empty($_POST['mail_address']) and $conf['obligatory_user_mail_address'])
     282  {
     283    //$_POST['mail_address'] = '';
     284    return l10n('reg_err_mail_address');
     285  }
     286
    270287  /* Email without forbidden domains */
    271288  if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']) and !ValidateEmailProvider($_POST['mail_address']))
    272289  {
    273     $_POST['login'] = '';
     290    //$_POST['mail_address'] = '';
    274291    return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'");
    275292  }
Note: See TracChangeset for help on using the changeset viewer.