allow local_part to change (in theory this code serves no purpose, as the username cannot be changed.. but perhaps it will be in the future (part 2 of operation shut-up-libertytek-charles :) )

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@496 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 16 years ago
parent f658e115b3
commit 81059ddbdd

@ -151,8 +151,10 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$formvars['name'] = $fName;
$formvars['quota'] =$quota;
$formvars['active']=$sqlActive;
$result = db_update ('mailbox', "username='$fUsername' AND domain='$fDomain'", $formvars, array('modified'));
if(preg_match('/^(.*)@/', $fUsername, $matches)) {
$formvars['local_part'] = $matches[1];
}
$result = db_update('mailbox', "username='$fUsername' AND domain='$fDomain'", $formvars, array('modified'));
$maildir = $user_details['maildir'];
if ($result != 1 || !mailbox_postedit($fUsername,$fDomain,$maildir, $quota)) {
$tMessage = $PALANG['pEdit_mailbox_result_error'];

Loading…
Cancel
Save