SF.net SVN: postfixadmin:[481] trunk/create-mailbox.php
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2008-11-12 22:57:35
|
Revision: 481 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=481&view=rev Author: christian_boltz Date: 2008-11-12 22:57:30 +0000 (Wed, 12 Nov 2008) Log Message: ----------- create-mailbox.php: - show password when $CONF['generate_password'] == 'YES', fixes https://sourceforge.net/tracker/index.php?func=detail&aid=2015707&group_id=191583&atid=937964 - do not show password if it was _not_ autogenerated and $CONF['show_password'] == 'NO' Modified Paths: -------------- trunk/create-mailbox.php Modified: trunk/create-mailbox.php =================================================================== --- trunk/create-mailbox.php 2008-11-12 22:07:50 UTC (rev 480) +++ trunk/create-mailbox.php 2008-11-12 22:57:30 UTC (rev 481) @@ -112,11 +112,13 @@ $pCreate_mailbox_username_text = $PALANG['pCreate_mailbox_username_text_error1']; } + $tPassGenerated = 0; if (empty ($fPassword) or empty ($fPassword2) or ($fPassword != $fPassword2)) { if (empty ($fPassword) and empty ($fPassword2) and $CONF['generate_password'] == "YES") { $fPassword = generate_password (); + $tPassGenerated = 1; } else { @@ -278,22 +280,6 @@ */ $tDomain = $fDomain; - if ($CONF['generate_password'] == "YES") - { - $tMessage .= " / $fPassword)</br />"; - } - else - { - if ($CONF['show_password'] == "YES") - { - $tMessage .= " / $fPassword)</br />"; - } - else - { - $tMessage .= ")</br />"; - } - } - $tQuota = $CONF['maxquota']; if ($fMail == "on") @@ -320,11 +306,14 @@ } } + $tShowpass = ""; + if ( $tPassGenerated == 1 || $CONF['show_password'] == "YES") $tShowpass = " / $fPassword"; + if (create_mailbox_subfolders($fUsername,$fPassword)) { - $tMessage = $PALANG['pCreate_mailbox_result_success'] . "<br />($fUsername)"; + $tMessage .= $PALANG['pCreate_mailbox_result_success'] . "<br />($fUsername$tShowpass)"; } else { - $tMessage = $PALANG['pCreate_mailbox_result_succes_nosubfolders'] . "<br />($fUsername)"; + $tMessage .= $PALANG['pCreate_mailbox_result_succes_nosubfolders'] . "<br />($fUsername$tShowpass)"; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |