Changeset 6757 for extensions/NBC_UserAdvManager/trunk/main.inc.php
- Timestamp:
- Aug 15, 2010, 2:55:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/main.inc.php
r6753 r6757 128 128 $conf_UAM = unserialize($conf['UserAdvManager']); 129 129 130 /* Sending registration confirmation by email */ 131 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 132 { 133 if (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'true') 134 { 135 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 136 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 137 } 138 elseif (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'false') 139 { 130 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 131 { 132 /* This is to send an information email and set user to "waiting" group or status until admin validation */ 140 133 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 141 134 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 135 setgroup($register_user['id']);// Set to "waiting" group or status until admin validation 136 } 137 elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 138 { 139 /* This is to set user to "wainting" group or status until admin validation */ 140 setgroup($register_user['id']);// Set to "waiting" group or status until admin validation 141 } 142 elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'false')) 143 { 144 /* This is to send an information email without validation key */ 145 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 146 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 147 } 148 /* Sending registration confirmation by email */ 149 elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 150 { 151 if (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'true') 152 { 153 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 154 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 155 } 156 elseif (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'false') 157 { 158 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 159 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 142 160 } 143 161 elseif (!is_admin()) 144 162 { 145 $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';146 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true);163 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 164 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 147 165 } 148 166 } … … 337 355 338 356 /* Sending registration confirmation by email */ 339 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') )357 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 340 358 { 341 359 $confirm_mail_need = false; … … 350 368 351 369 list($current_email) = pwg_db_fetch_row(pwg_query($query)); 352 353 if ($_POST['mail_address'] != $current_email and ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 370 371 /* This is to send a new validation key */ 372 if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 354 373 355 374 $confirm_mail_need = true; 375 376 /* This is to set the user to "waiting" group or status until admin validation */ 377 if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 378 379 setgroup($register_user['id']);// Set to "waiting" group or status until admin validation 380 $confirm_mail_need = false; 356 381 } 357 382
Note: See TracChangeset
for help on using the changeset viewer.