Index: /trunk/admin/themes/default/template/install.tpl
===================================================================
--- /trunk/admin/themes/default/template/install.tpl	(revision 12884)
+++ /trunk/admin/themes/default/template/install.tpl	(revision 12885)
@@ -279,9 +279,13 @@
       <td>{'Options'|@translate}</options>
       <td colspan="2">
-<label>
-<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
-<span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
-</label>
-<br>
+        <label>
+          <input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
+          <span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
+        </label>
+        <br>
+        <label>
+          <input type="checkbox" name="send_password_by_mail" checked="checked">
+          {'Send my password by email'|@translate}
+        </label>
       </td>
     </tr>
Index: /trunk/install.php
===================================================================
--- /trunk/install.php	(revision 12884)
+++ /trunk/install.php	(revision 12885)
@@ -462,23 +462,26 @@
     
     // email notification
-    include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-          
-    $keyargs_content = array(
-      get_l10n_args('Hello %s,', $admin_name),
-      get_l10n_args('Welcome to your new installation of Piwigo!', ''),
-      get_l10n_args('', ''),
-      get_l10n_args('Here is your password: %s', $admin_pass1),
-      get_l10n_args('', ''),
-      get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
-      );
-      
-    pwg_mail(
-      $admin_mail,
-      array(
-        'subject' => 'Just another Piwigo gallery',
-        'content' => l10n_args($keyargs_content),
-        'content_format' => 'text/plain',
-        )
-      );
+    if (isset($_POST['send_password_by_mail']))
+    {
+      include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+            
+      $keyargs_content = array(
+        get_l10n_args('Hello %s,', $admin_name),
+        get_l10n_args('Welcome to your new installation of Piwigo!', ''),
+        get_l10n_args('', ''),
+        get_l10n_args('Here is your password: %s', $admin_pass1),
+        get_l10n_args('', ''),
+        get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
+        );
+        
+      pwg_mail(
+        $admin_mail,
+        array(
+          'subject' => 'Just another Piwigo gallery',
+          'content' => l10n_args($keyargs_content),
+          'content_format' => 'text/plain',
+          )
+        );
+    }
   }
 }
Index: /trunk/language/en_UK/common.lang.php
===================================================================
--- /trunk/language/en_UK/common.lang.php	(revision 12884)
+++ /trunk/language/en_UK/common.lang.php	(revision 12885)
@@ -308,4 +308,5 @@
 $lang['searched words : %s'] = "searched words : %s";
 $lang['Sent by'] = "Sent by";
+$lang['Send my password by email'] = 'Send my password by email';
 $lang['set as album representative'] = "set as album thumbnail";
 $lang['Show file metadata'] = "Show file metadata";
Index: /trunk/language/fr_CA/common.lang.php
===================================================================
--- /trunk/language/fr_CA/common.lang.php	(revision 12884)
+++ /trunk/language/fr_CA/common.lang.php	(revision 12885)
@@ -372,5 +372,6 @@
 $lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
 $lang['If you think you\'ve received this email in error, please contact us at %s'] = 'Si vous pensez avoir reçu cet email par erreur, veuillez nous contacter %s';
-$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription terminée, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
+$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription réussie, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
+$lang['Send my password by email'] = 'Recevoir mon mot de passe par email';
 
 ?>
Index: /trunk/language/fr_FR/common.lang.php
===================================================================
--- /trunk/language/fr_FR/common.lang.php	(revision 12884)
+++ /trunk/language/fr_FR/common.lang.php	(revision 12885)
@@ -308,4 +308,5 @@
 $lang['searched words : %s'] = 'mots recherchés : %s';
 $lang['Sent by'] = 'Envoyé par';
+$lang['Send my password by email'] = 'Recevoir mon mot de passe par email';
 $lang['set as album representative'] = 'Choisir comme représentante de cet album';
 $lang['Show file metadata'] = 'Montrer les méta-données du fichier';
@@ -318,5 +319,5 @@
 $lang['Sort by'] = 'Trier selon';
 $lang['Sort order'] = 'Ordre de tri';
-$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription terminée, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
+$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription réussie, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
 $lang['Specials'] = 'Spéciales';
 $lang['SQL queries in'] = 'requêtes SQL en';
Index: /trunk/register.php
===================================================================
--- /trunk/register.php	(revision 12884)
+++ /trunk/register.php	(revision 12885)
@@ -61,28 +61,32 @@
   {
     // email notification
-    include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-          
-    $keyargs_content = array(
-      get_l10n_args('Hello %s,', $_POST['login']),
-      get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']),
-      get_l10n_args('', ''),
-      get_l10n_args('Here is your password: %s', $_POST['password']),
-      get_l10n_args('', ''),
-      get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()),
-      );
-      
-    pwg_mail(
-      $_POST['mail_address'],
-      array(
-        'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
-        'content' => l10n_args($keyargs_content),
-        'content_format' => 'text/plain',
-        )
-      );
+    if (isset($_POST['send_password_by_mail']) and isset($_POST['mail_address']))
+    {
+      include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+            
+      $keyargs_content = array(
+        get_l10n_args('Hello %s,', $_POST['login']),
+        get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']),
+        get_l10n_args('', ''),
+        get_l10n_args('Here is your password: %s', $_POST['password']),
+        get_l10n_args('', ''),
+        get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()),
+        );
+        
+      pwg_mail(
+        $_POST['mail_address'],
+        array(
+          'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
+          'content' => l10n_args($keyargs_content),
+          'content_format' => 'text/plain',
+          )
+        );
+        
+      $_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
+    }
     
     // log user and redirect
     $user_id = get_userid($_POST['login']);
     log_user($user_id, false);
-    $_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
     redirect(make_index_url());
   }
Index: /trunk/themes/default/template/register.tpl
===================================================================
--- /trunk/themes/default/template/register.tpl	(revision 12884)
+++ /trunk/themes/default/template/register.tpl	(revision 12885)
@@ -47,4 +47,10 @@
       {/if}
       </li>
+      <li>
+        <span class="property">
+          <label for="send_password_by_mail">{'Send my password by email'|@translate}</label>
+        </span>
+        <input type="checkbox" name="send_password_by_mail" id="send_password_by_mail" value="1" checked="checked">
+      </li>
     </ul>
 
