inc/users.inc.php
changeset 183 aae57715199e
parent 126 cb06e3e29ed8
child 184 b60b88b1ae08
--- a/inc/users.inc.php	Fri Jun 20 12:21:03 2008 +0000
+++ b/inc/users.inc.php	Fri Jul 11 07:44:10 2008 +0000
@@ -712,10 +712,15 @@
 				username = " . $db->quote($details['username']) . ",
 				fullname = " . $db->quote($details['fullname']) . ",
 				email = " . $db->quote($details['email']) . ",
-				perm_templ = " . $db->quote($details['templ_id']) . ",
 				description = " . $db->quote($details['descr']) . ", 
 				active = " . $db->quote($active) ;
 
+		// If the user is alllowed to change the permission template, set it.
+		if ($perm_templ_perm_edit == "1") {
+			$query .= ", perm_templ = " . $db->quote($details['templ_id']) ;
+
+		}
+
 		// TODO Check if function works if password is set too.
 		if($details['password'] != "") {
 			$query .= ", password = '" . md5($db->quote($details['password'])) . "' ";