Rolle TOUR GUIDE einführen

This commit is contained in:
torsten 2026-11-08 18:07:28 +01:00
parent 4f65250190
commit ca3c490d4a
11 changed files with 54 additions and 10 deletions

View file

@ -136,7 +136,11 @@ class UserController
// Rolle nur durch Admins änderbar
if ($current->isAdmin()) {
$user->role = (string) input('role', $user->role);
$newRole = (string) input('role', $user->role);
if (in_array($newRole, ['GUEST', 'MEMBER', 'TOUR GUIDE', 'ADMIN'], true)) {
$user->role = $newRole;
}
}
$user->updated_at = now();