Changeset 3858 for extensions/NBC_UserAdvManager/trunk/main.inc.php
- Timestamp:
- Sep 17, 2009, 9:41:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/main.inc.php
r3826 r3858 50 50 -- 2.10.9f : Compatibility bug fixed when used with DynamicRecentPeriod plugin 51 51 52 -- 2.11.0 : New tabsheet menu to manage ConfirMail functions (setting a timeout without validation, Cleanup expired user's accounts, Force confirmation, Force expiration, list unvalidated users,...)53 Beautify plugin's main admin panel52 -- 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,...) 53 Beautify plugin's main admin panel 54 54 55 55 */ … … 62 62 63 63 ++ No single email check for admins (new trigger needed in (functions_user.inc.php ?)) 64 65 ++ Administration page for Confirm Mail66 ++ Admin tabsheet for Confirm Mail to set options :67 ++ Setting a delay time with timeout for email confirmation (Timeout = CurrentDate - RegistrationDate)68 -- List of users who haven't validated - could be easy to set with groups options : Unvalidated users are in a "Unvalidated" group.69 ++ List of users with expired validation time70 -- List of validates users ? -> Same as "List of users who haven't validated" : They could belong to a "validated" group.71 ++ Opportunities to take actions on database tables :72 ++ Re-asking validation (case of non reception of validation email)73 ++ Force expiration74 ++ Force confirmation75 ++ Cleanup expired user's accounts76 ++ (...)77 64 78 65 ++ Password control and enforcement … … 93 80 94 81 95 96 82 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 83 97 84 define('NBC_UserAdvManager_DIR' , basename(dirname(__FILE__))); 98 85 define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 86 99 87 include_once (NBC_UserAdvManager_PATH.'include/constants.php'); 100 88 include_once (NBC_UserAdvManager_PATH.'include/functions_UserAdvManager.inc.php'); 89 101 90 load_language('plugin.lang', NBC_UserAdvManager_PATH); 102 91 … … 129 118 130 119 if (( isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or ( isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true')) 131 SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true); 120 121 SendMail2User(1, $register_user['id'], $register_user['username'], $_POST['password'], $register_user['email'], true); 132 122 } 133 123 … … 205 195 //} 206 196 /* This work with a code copy of ValidateEmailProvider() function */ 207 208 {209 $ncsemail = strtolower($_POST['email']);210 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);211 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)197 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email'])) 198 { 199 $ncsemail = strtolower($_POST['email']); 200 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 201 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 212 202 { 213 203 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 214 if (preg_match($pattern, $ncsemail)) 215 { 216 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 217 $_POST['login'] = ''; 204 if (preg_match($pattern, $ncsemail)) 205 { 206 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 207 $_POST['login'] = ''; 208 } 218 209 } 219 210 } 220 }221 211 } 222 212 } … … 251 241 //} 252 242 /* This work with a code copy of ValidateEmailProvider() function */ 253 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))243 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address'])) 254 244 { 255 245 $ncsemail = strtolower($_POST['mail_address']); 256 246 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 257 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)247 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 258 248 { 259 249 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 260 250 if (preg_match($pattern, $ncsemail)) 261 251 { 262 263 $_POST['login'] = '';252 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 253 $_POST['login'] = ''; 264 254 } 265 255 } … … 312 302 $errors[] = $mail_error; 313 303 } 314 /* This don't work on user's profile page - Why ?? */315 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']))316 {317 $ncsemail = strtolower($_POST['mail_address']);318 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);319 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)320 {321 322 if (preg_match($pattern, $ncsemail))323 {324 $mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'";325 }326 }327 }328 if (!empty($mail_error))304 305 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address'])) 306 { 307 $ncsemail = strtolower($_POST['mail_address']); 308 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 309 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 310 { 311 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 312 if (preg_match($pattern, $ncsemail)) 313 { 314 $mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 315 } 316 } 317 } 318 if (!empty($mail_error)) 329 319 { 330 320 $errors[] = $mail_error; 331 321 } 332 322 } 333 /* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/334 //if (isset($_POST['mail_address']))335 //{336 // $mail_error = ValidateEmailProvider($_POST['mail_address']);337 // if (!empty($mail_error))338 // {339 // $errors[] = $mail_error;340 // }341 //}342 323 343 324 $typemail = 3;
Note: See TracChangeset
for help on using the changeset viewer.