[pve-devel] r6222 - pve-access-control/trunk/PVE/API2

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Jul 4 07:53:06 CEST 2011


Author: dietmar
Date: 2011-07-04 07:53:05 +0200 (Mon, 04 Jul 2011)
New Revision: 6222

Modified:
   pve-access-control/trunk/PVE/API2/User.pm
Log:
allow to set empty values 


Modified: pve-access-control/trunk/PVE/API2/User.pm
===================================================================
--- pve-access-control/trunk/PVE/API2/User.pm	2011-07-01 13:17:29 UTC (rev 6221)
+++ pve-access-control/trunk/PVE/API2/User.pm	2011-07-04 05:53:05 UTC (rev 6222)
@@ -242,10 +242,10 @@
 		    }
 		}
 
-		$usercfg->{users}->{$username}->{firstname} = $param->{firstname} if $param->{firstname};
-		$usercfg->{users}->{$username}->{lastname} = $param->{lastname} if $param->{lastname};
-		$usercfg->{users}->{$username}->{email} = $param->{email} if $param->{email};
-		$usercfg->{users}->{$username}->{comment} = $param->{comment} if $param->{comment};
+		$usercfg->{users}->{$username}->{firstname} = $param->{firstname} if defined($param->{firstname});
+		$usercfg->{users}->{$username}->{lastname} = $param->{lastname} if defined($param->{lastname});
+		$usercfg->{users}->{$username}->{email} = $param->{email} if defined($param->{email});
+		$usercfg->{users}->{$username}->{comment} = $param->{comment} if defined($param->{comment});
 
 		cfs_write_file("user.cfg", $usercfg);
 	    }, "update user failed");




More information about the pve-devel mailing list