Implement node flags
This commit is contained in:
5
user.php
5
user.php
@@ -61,13 +61,14 @@ switch ($submit = form_get_action()) {
|
||||
$role_manage = sanitize($_POST['role_manage']);
|
||||
$role_admin = sanitize($_POST['role_admin']);
|
||||
|
||||
// construct menu set
|
||||
// construct role set
|
||||
$role = array();
|
||||
if ($role_add) $role[] = 'add';
|
||||
if ($role_edit) $role[] = 'edit';
|
||||
if ($role_delete) $role[] = 'delete';
|
||||
if ($role_manage) $role[] = 'manage';
|
||||
if ($role_admin) $role[] = 'admin';
|
||||
$role = empty($role) ? NULL : implode(',', $role);
|
||||
|
||||
$sql = "UPDATE user SET
|
||||
user_name=?, user_displayname=?, user_realm=?,
|
||||
@@ -75,7 +76,7 @@ switch ($submit = form_get_action()) {
|
||||
WHERE user_id=?";
|
||||
$sth = $dbh->prepare($sql);
|
||||
$sth->execute([$user_name ,$user_displayname, $user_realm,
|
||||
implode(',', $role), $id]);
|
||||
$role, $id]);
|
||||
$action = ACT_VIEW;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user