Upload via GUI (452 Dateien)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../includes/bootstrap.php';
|
||||
$staff = require_staff_login();
|
||||
$staff = require_admin_or_permission('manage_customers');
|
||||
$pdo = get_db();
|
||||
|
||||
$errors = [];
|
||||
@@ -10,7 +10,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
verify_csrf();
|
||||
$action = $_POST['action'] ?? '';
|
||||
|
||||
if ($action === 'assign_org' && $staff['role'] === 'admin') {
|
||||
if ($action === 'assign_org') {
|
||||
$userId = (int) $_POST['user_id'];
|
||||
$orgId = $_POST['organization_id'] !== '' ? (int) $_POST['organization_id'] : null;
|
||||
$pdo->prepare('UPDATE users SET organization_id = ? WHERE id = ?')->execute([$orgId, $userId]);
|
||||
|
||||
Reference in New Issue
Block a user