Changeset 26934 for extensions/UserAdvManager
- Timestamp:
- Jan 23, 2014, 10:38:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/include/functions.inc.php
r26914 r26934 142 142 143 143 // -------------------------------------------------------------------------------------------------------------------- 144 // Workflow when admins have to validate registrations (CONFIRM_MAIL = local) 145 // No validation needed when admins add users if ADMINCONFMAIL is set to OFF - users are considered as valid by default 146 // Else a notification email with validation link is send to admins 147 // Finally when a user registers himself, a notification email with validation link is send to admins 144 // Workflow when admins have to validate registrations (CONFIRM_MAIL = local): 145 // 1- A confirmation email with validation link is send to users added by admins 146 // 2- Else no validation needed when admins add users if ADMINCONFMAIL is set to OFF - users are considered as valid by 147 // default and no information email is send to user from UAM (Piwigo will do that by checking the option box) 148 // 3- Finally when a user registers himself, a notification email with validation link is send to admins 148 149 // -------------------------------------------------------------------------------------------------------------------- 149 150 if (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'local') 150 151 { 151 if (is_admin() and isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'true')152 if (is_admin() and (isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'true')) 152 153 { 153 154 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 154 155 } 155 elseif (is_admin() and isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'false')156 elseif (is_admin() and (isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'false')) 156 157 { 157 158 SetValidated($register_user['id']); 158 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 159 // Pending information email - Managed by Piwigo 160 //SendMail2User(2, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 159 161 } 160 162 elseif (!is_admin()) … … 164 166 } 165 167 // -------------------------------------------------------------------------------------------------------------------- 166 // Workflow when users have to validate their registration (CONFIRM_MAIL = true) 167 // No validation needed when admins add users if ADMINCONFMAIL is set to OFF - users are considered as valid by default 168 // Else an email with validation link is send to user 169 // Finally when a user registers himself, an email with validation link is send to him 168 // Workflow when users have to validate their registration (CONFIRM_MAIL = true): 169 // 1- A confirmation email with validation link is send to users added by admins 170 // 2- ELse no validation needed when admins add users if ADMINCONFMAIL is set to OFF - users are considered as valid by 171 // default and no information email is send to user from UAM (Piwigo will do that by checking the option box) 172 // 3- Finally when a user registers himself, an email with validation link is send to him 170 173 // -------------------------------------------------------------------------------------------------------------------- 171 174 elseif (isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true') 172 175 { 173 if (is_admin() and isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'true')176 if (is_admin() and (isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'true')) 174 177 { 175 178 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 176 179 } 177 elseif (is_admin() and isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'false')180 elseif (is_admin() and (isset($conf_UAM['ADMINCONFMAIL']) and $conf_UAM['ADMINCONFMAIL'] == 'false')) 178 181 { 179 182 SetValidated($register_user['id']); 180 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 183 // Pending information email - Managed by Piwigo 184 //SendMail2User(2, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 181 185 } 182 186 elseif (!is_admin()) … … 317 321 } 318 322 319 $typemail = 2; 320 321 // Send email 323 // Send information email 322 324 if ((isset($conf_UAM['MAIL_INFO']) and $conf_UAM['MAIL_INFO'] == 'true') or $confirm_mail_need) 323 325 { … … 330 332 list($username) = pwg_db_fetch_row(pwg_query($query)); 331 333 332 SendMail2User( $typemail, $user['id'], $username, $_POST['use_new_pwd'], $_POST['mail_address'], $confirm_mail_need);334 SendMail2User(2, $user['id'], $username, $_POST['use_new_pwd'], $_POST['mail_address'], $confirm_mail_need); 333 335 } 334 336 } … … 1196 1198 } 1197 1199 1200 // $converted_res = ($confirm) ? 'true' : 'false'; 1201 // UAMLog($typemail,$converted_res,$conf_UAM['CONFIRM_MAIL'],$subject); 1198 1202 1199 1203 // Sending the email with subject and contents … … 1217 1221 1218 1222 1219 if ( isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true'and $confirm) // Confirmation email send to users1223 if ((isset($conf_UAM['CONFIRM_MAIL']) and $conf_UAM['CONFIRM_MAIL'] == 'true') and $confirm) // Confirmation email send to users 1220 1224 { 1221 1225 // Adding gallery URL at the end of the email … … 1273 1277 1274 1278 1275 if ( isset($conf_UAM['MAIL_INFO']) and $conf_UAM['MAIL_INFO'] == 'true') // Information email send to users1279 if ((isset($conf_UAM['MAIL_INFO']) and $conf_UAM['MAIL_INFO'] == 'true') and $typemail <> 1) // Information email send to users 1276 1280 { 1277 1281 // Adding gallery URL at the end of the email
Note: See TracChangeset
for help on using the changeset viewer.