# HG changeset patch # User rejo # Date 1215762250 0 # Node ID aae57715199ecee53101e27e4041fbcf7efc67e9 # Parent 049347a649e0e9d48edf6cc4c148466f67e65566 [feladat @ 291] Bugfix. A user without the privilige to change the permission templates for users couldn't change user properties. Closes: #80. diff -r 049347a649e0 -r aae57715199e inc/users.inc.php --- 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'])) . "' "; diff -r 049347a649e0 -r aae57715199e users.php --- a/users.php Fri Jun 20 12:21:03 2008 +0000 +++ b/users.php Fri Jul 11 07:44:10 2008 +0000 @@ -77,7 +77,8 @@ } echo " \n"; } else { - echo $user['tpl_name']; + echo " \n"; + echo " " . $user['tpl_name'] . "\n"; } echo " \n"; echo "