SF.net SVN: postfixadmin:[496] trunk/edit-mailbox.php
Brought to you by:
christian_boltz,
gingerdog
|
From: <Gin...@us...> - 2008-12-12 19:40:44
|
Revision: 496
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=496&view=rev
Author: GingerDog
Date: 2008-12-12 19:40:39 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
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 :) )
Modified Paths:
--------------
trunk/edit-mailbox.php
Modified: trunk/edit-mailbox.php
===================================================================
--- trunk/edit-mailbox.php 2008-12-11 21:14:59 UTC (rev 495)
+++ trunk/edit-mailbox.php 2008-12-12 19:40:39 UTC (rev 496)
@@ -151,8 +151,10 @@
$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'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|